summaryrefslogtreecommitdiffstats
path: root/src/Generating/ChunkGenerator.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-10-20 22:55:07 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-10-20 22:55:07 +0200
commit987f79afdd8945966d0dfa2d52539e005f771590 (patch)
treefa55849604121317e0a565465212032ebe4b79cb /src/Generating/ChunkGenerator.cpp
parentUse std::recusive_mutex (diff)
downloadcuberite-987f79afdd8945966d0dfa2d52539e005f771590.tar
cuberite-987f79afdd8945966d0dfa2d52539e005f771590.tar.gz
cuberite-987f79afdd8945966d0dfa2d52539e005f771590.tar.bz2
cuberite-987f79afdd8945966d0dfa2d52539e005f771590.tar.lz
cuberite-987f79afdd8945966d0dfa2d52539e005f771590.tar.xz
cuberite-987f79afdd8945966d0dfa2d52539e005f771590.tar.zst
cuberite-987f79afdd8945966d0dfa2d52539e005f771590.zip
Diffstat (limited to 'src/Generating/ChunkGenerator.cpp')
-rw-r--r--src/Generating/ChunkGenerator.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Generating/ChunkGenerator.cpp b/src/Generating/ChunkGenerator.cpp
index 20b6b7066..b08b9411e 100644
--- a/src/Generating/ChunkGenerator.cpp
+++ b/src/Generating/ChunkGenerator.cpp
@@ -28,9 +28,9 @@ const unsigned int QUEUE_SKIP_LIMIT = 500;
cChunkGenerator::cChunkGenerator(void) :
super("cChunkGenerator"),
m_Seed(0), // Will be overwritten by the actual generator
- m_Generator(NULL),
- m_PluginInterface(NULL),
- m_ChunkSink(NULL)
+ m_Generator(nullptr),
+ m_PluginInterface(nullptr),
+ m_ChunkSink(nullptr)
{
}
@@ -80,7 +80,7 @@ bool cChunkGenerator::Start(cPluginInterface & a_PluginInterface, cChunkSink & a
m_Generator = new cComposableGenerator(*this);
}
- if (m_Generator == NULL)
+ if (m_Generator == nullptr)
{
LOGERROR("Generator could not start, aborting the server");
return false;
@@ -103,7 +103,7 @@ void cChunkGenerator::Stop(void)
Wait();
delete m_Generator;
- m_Generator = NULL;
+ m_Generator = nullptr;
}
@@ -144,7 +144,7 @@ void cChunkGenerator::QueueGenerateChunk(int a_ChunkX, int a_ChunkZ, bool a_Forc
void cChunkGenerator::GenerateBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::BiomeMap & a_BiomeMap)
{
- if (m_Generator != NULL)
+ if (m_Generator != nullptr)
{
m_Generator->GenerateBiomes(a_ChunkX, a_ChunkZ, a_BiomeMap);
}
@@ -180,7 +180,7 @@ int cChunkGenerator::GetQueueLength(void)
EMCSBiome cChunkGenerator::GetBiomeAt(int a_BlockX, int a_BlockZ)
{
- ASSERT(m_Generator != NULL);
+ ASSERT(m_Generator != nullptr);
return m_Generator->GetBiomeAt(a_BlockX, a_BlockZ);
}
@@ -283,8 +283,8 @@ void cChunkGenerator::Execute(void)
void cChunkGenerator::DoGenerate(int a_ChunkX, int a_ChunkZ)
{
- ASSERT(m_PluginInterface != NULL);
- ASSERT(m_ChunkSink != NULL);
+ ASSERT(m_PluginInterface != nullptr);
+ ASSERT(m_ChunkSink != nullptr);
ASSERT(m_ChunkSink->IsChunkQueued(a_ChunkX, a_ChunkZ));
cChunkDesc ChunkDesc(a_ChunkX, a_ChunkZ);