Add VoxelArea::hasEmptyExtent
[oweals/minetest.git] / src / voxel.cpp
index 1299a5296da9c5eef0d25e243b6f2ca721f5e052..02da42459ea3edbede63289d54cbe32402d7bba9 100644 (file)
@@ -139,7 +139,7 @@ void VoxelManipulator::print(std::ostream &o, INodeDefManager *ndef,
 void VoxelManipulator::addArea(const VoxelArea &area)
 {
        // Cancel if requested area has zero volume
-       if(area.getExtent() == v3s16(0,0,0))
+       if (area.hasEmptyExtent())
                return;
 
        // Cancel if m_area already contains the requested area
@@ -151,7 +151,7 @@ void VoxelManipulator::addArea(const VoxelArea &area)
        // Calculate new area
        VoxelArea new_area;
        // New area is the requested area if m_area has zero volume
-       if(m_area.getExtent() == v3s16(0,0,0))
+       if(m_area.hasEmptyExtent())
        {
                new_area = area;
        }