mirror of
https://github.com/minetest/minetest.git
synced 2024-08-20 05:24:15 +02:00
Fix inconsistent integer comparison warnings
This commit is contained in:
parent
2eec997e97
commit
3b842a7e02
@ -102,7 +102,7 @@ void imageCleanTransparent(video::IImage *src, u32 threshold)
|
||||
|
||||
// Then repeatedly look for transparent pixels, filling them in until
|
||||
// we're finished.
|
||||
for (u32 iter = 0; iter < iter_max; iter++) {
|
||||
for (int iter = 0; iter < iter_max; iter++) {
|
||||
|
||||
for (u32 ctry = 0; ctry < dim.Height; ctry++)
|
||||
for (u32 ctrx = 0; ctrx < dim.Width; ctrx++) {
|
||||
|
@ -49,7 +49,7 @@ SettingsHierarchy::SettingsHierarchy(Settings *fallback)
|
||||
|
||||
Settings *SettingsHierarchy::getLayer(int layer) const
|
||||
{
|
||||
if (layer < 0 || layer >= layers.size())
|
||||
if (layer < 0 || layer >= (int)layers.size())
|
||||
throw BaseException("Invalid settings layer");
|
||||
return layers[layer];
|
||||
}
|
||||
@ -57,7 +57,7 @@ Settings *SettingsHierarchy::getLayer(int layer) const
|
||||
|
||||
Settings *SettingsHierarchy::getParent(int layer) const
|
||||
{
|
||||
assert(layer >= 0 && layer < layers.size());
|
||||
assert(layer >= 0 && layer < (int)layers.size());
|
||||
// iterate towards the origin (0) to find the next fallback layer
|
||||
for (int i = layer - 1; i >= 0; --i) {
|
||||
if (layers[i])
|
||||
@ -72,8 +72,8 @@ void SettingsHierarchy::onLayerCreated(int layer, Settings *obj)
|
||||
{
|
||||
if (layer < 0)
|
||||
throw BaseException("Invalid settings layer");
|
||||
if (layers.size() < layer+1)
|
||||
layers.resize(layer+1);
|
||||
if ((int)layers.size() < layer + 1)
|
||||
layers.resize(layer + 1);
|
||||
|
||||
Settings *&pos = layers[layer];
|
||||
if (pos)
|
||||
|
Loading…
Reference in New Issue
Block a user