aboutsummaryrefslogtreecommitdiff
path: root/src/mapsector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapsector.cpp')
-rw-r--r--src/mapsector.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/mapsector.cpp b/src/mapsector.cpp
index b004b9013..3eefa5410 100644
--- a/src/mapsector.cpp
+++ b/src/mapsector.cpp
@@ -22,8 +22,10 @@ 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)
{
}
@@ -46,7 +48,7 @@ void MapSector::deleteBlocks()
m_blocks.clear();
}
-MapBlock *MapSector::getBlockBuffered(s16 y)
+MapBlock * MapSector::getBlockBuffered(s16 y)
{
MapBlock *block;
@@ -55,7 +57,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
@@ -65,14 +67,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);
@@ -81,7 +83,7 @@ MapBlock *MapSector::createBlankBlockNoInsert(s16 y)
return block;
}
-MapBlock *MapSector::createBlankBlock(s16 y)
+MapBlock * MapSector::createBlankBlock(s16 y)
{
MapBlock *block = createBlankBlockNoInsert(y);