diff options
Diffstat (limited to 'src/mapsector.cpp')
-rw-r--r-- | src/mapsector.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/mapsector.cpp b/src/mapsector.cpp index 3eefa5410..b004b9013 100644 --- a/src/mapsector.cpp +++ b/src/mapsector.cpp @@ -22,10 +22,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "mapblock.h" #include "serialization.h" -MapSector::MapSector(Map *parent, v2s16 pos, IGameDef *gamedef): - m_parent(parent), - m_pos(pos), - m_gamedef(gamedef) +MapSector::MapSector(Map *parent, v2s16 pos, IGameDef *gamedef) : + m_parent(parent), m_pos(pos), m_gamedef(gamedef) { } @@ -48,7 +46,7 @@ void MapSector::deleteBlocks() m_blocks.clear(); } -MapBlock * MapSector::getBlockBuffered(s16 y) +MapBlock *MapSector::getBlockBuffered(s16 y) { MapBlock *block; @@ -57,7 +55,7 @@ MapBlock * MapSector::getBlockBuffered(s16 y) } // If block doesn't exist, return NULL - std::unordered_map<s16, MapBlock*>::const_iterator n = m_blocks.find(y); + std::unordered_map<s16, MapBlock *>::const_iterator n = m_blocks.find(y); block = (n != m_blocks.end() ? n->second : nullptr); // Cache the last result @@ -67,14 +65,14 @@ MapBlock * MapSector::getBlockBuffered(s16 y) return block; } -MapBlock * MapSector::getBlockNoCreateNoEx(s16 y) +MapBlock *MapSector::getBlockNoCreateNoEx(s16 y) { return getBlockBuffered(y); } -MapBlock * MapSector::createBlankBlockNoInsert(s16 y) +MapBlock *MapSector::createBlankBlockNoInsert(s16 y) { - assert(getBlockBuffered(y) == NULL); // Pre-condition + assert(getBlockBuffered(y) == NULL); // Pre-condition v3s16 blockpos_map(m_pos.X, y, m_pos.Y); @@ -83,7 +81,7 @@ MapBlock * MapSector::createBlankBlockNoInsert(s16 y) return block; } -MapBlock * MapSector::createBlankBlock(s16 y) +MapBlock *MapSector::createBlankBlock(s16 y) { MapBlock *block = createBlankBlockNoInsert(y); |