mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-30 04:35:20 +01:00
Use std::string::empty() instead of size() where applicable
This commit is contained in:
@@ -276,7 +276,7 @@ void Map::unspreadLight(enum LightBank bank,
|
||||
v3s16(-1,0,0), // left
|
||||
};
|
||||
|
||||
if(from_nodes.size() == 0)
|
||||
if(from_nodes.empty())
|
||||
return;
|
||||
|
||||
u32 blockchangecount = 0;
|
||||
@@ -418,7 +418,7 @@ void Map::unspreadLight(enum LightBank bank,
|
||||
<<" for "<<from_nodes.size()<<" nodes"
|
||||
<<std::endl;*/
|
||||
|
||||
if(unlighted_nodes.size() > 0)
|
||||
if(!unlighted_nodes.empty())
|
||||
unspreadLight(bank, unlighted_nodes, light_sources, modified_blocks);
|
||||
}
|
||||
|
||||
@@ -455,7 +455,7 @@ void Map::spreadLight(enum LightBank bank,
|
||||
v3s16(-1,0,0), // left
|
||||
};
|
||||
|
||||
if(from_nodes.size() == 0)
|
||||
if(from_nodes.empty())
|
||||
return;
|
||||
|
||||
u32 blockchangecount = 0;
|
||||
@@ -575,7 +575,7 @@ void Map::spreadLight(enum LightBank bank,
|
||||
<<" for "<<from_nodes.size()<<" nodes"
|
||||
<<std::endl;*/
|
||||
|
||||
if(lighted_nodes.size() > 0)
|
||||
if(!lighted_nodes.empty())
|
||||
spreadLight(bank, lighted_nodes, modified_blocks);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user