From 10e0cf8b2c27917a3fd45e73a5d835af4313db3b Mon Sep 17 00:00:00 2001 From: Anton Date: Fri, 12 Dec 2014 19:55:40 +0500 Subject: Use std::string::empty() instead of size() where applicable --- src/voxel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/voxel.cpp') diff --git a/src/voxel.cpp b/src/voxel.cpp index e6d4bdcd2..335ab307c 100644 --- a/src/voxel.cpp +++ b/src/voxel.cpp @@ -420,7 +420,7 @@ void VoxelManipulator::unspreadLight(enum LightBank bank, std::map & from_nodes, std::set & light_sources, INodeDefManager *nodemgr) { - if(from_nodes.size() == 0) + if(from_nodes.empty()) return; for(std::map::iterator j = from_nodes.begin(); @@ -646,7 +646,7 @@ void VoxelManipulator::spreadLight(enum LightBank bank, v3s16(-1,0,0), // left }; - if(from_nodes.size() == 0) + if(from_nodes.empty()) return; std::set lighted_nodes; @@ -719,7 +719,7 @@ void VoxelManipulator::spreadLight(enum LightBank bank, <<" for "< 0) + if(!lighted_nodes.empty()) spreadLight(bank, lighted_nodes, nodemgr); } #endif -- cgit v1.2.3