summaryrefslogtreecommitdiffstats
path: root/src/Root.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-10-23 08:29:31 +0200
committerMattes D <github@xoft.cz>2014-10-23 08:29:31 +0200
commit4bfd2c9707f2c8484587f061393e8f9346d60fef (patch)
tree4b7bea204c0ddd18bb4f95357f9eb77590bc2e8d /src/Root.cpp
parentComposableGenerator: Removed nullptr initializers. (diff)
parentEn masse NULL -> nullptr replace (diff)
downloadcuberite-4bfd2c9707f2c8484587f061393e8f9346d60fef.tar
cuberite-4bfd2c9707f2c8484587f061393e8f9346d60fef.tar.gz
cuberite-4bfd2c9707f2c8484587f061393e8f9346d60fef.tar.bz2
cuberite-4bfd2c9707f2c8484587f061393e8f9346d60fef.tar.lz
cuberite-4bfd2c9707f2c8484587f061393e8f9346d60fef.tar.xz
cuberite-4bfd2c9707f2c8484587f061393e8f9346d60fef.tar.zst
cuberite-4bfd2c9707f2c8484587f061393e8f9346d60fef.zip
Diffstat (limited to 'src/Root.cpp')
-rw-r--r--src/Root.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/Root.cpp b/src/Root.cpp
index 02455518c..6a91ec238 100644
--- a/src/Root.cpp
+++ b/src/Root.cpp
@@ -35,21 +35,21 @@
-cRoot* cRoot::s_Root = NULL;
+cRoot* cRoot::s_Root = nullptr;
cRoot::cRoot(void) :
- m_pDefaultWorld(NULL),
- m_InputThread(NULL),
- m_Server(NULL),
- m_MonsterConfig(NULL),
- m_CraftingRecipes(NULL),
- m_FurnaceRecipe(NULL),
- m_WebAdmin(NULL),
- m_PluginManager(NULL),
+ m_pDefaultWorld(nullptr),
+ m_InputThread(nullptr),
+ m_Server(nullptr),
+ m_MonsterConfig(nullptr),
+ m_CraftingRecipes(nullptr),
+ m_FurnaceRecipe(nullptr),
+ m_WebAdmin(nullptr),
+ m_PluginManager(nullptr),
m_bStop(false),
m_bRestart(false)
{
@@ -215,7 +215,7 @@ void cRoot::Start(void)
}
#if !defined(ANDROID_NDK)
- delete m_InputThread; m_InputThread = NULL;
+ delete m_InputThread; m_InputThread = nullptr;
#endif
// Stop the server:
@@ -230,21 +230,21 @@ void cRoot::Start(void)
m_Authenticator.Stop();
LOGD("Freeing MonsterConfig...");
- delete m_MonsterConfig; m_MonsterConfig = NULL;
- delete m_WebAdmin; m_WebAdmin = NULL;
+ delete m_MonsterConfig; m_MonsterConfig = nullptr;
+ delete m_WebAdmin; m_WebAdmin = nullptr;
LOGD("Unloading recipes...");
- delete m_FurnaceRecipe; m_FurnaceRecipe = NULL;
- delete m_CraftingRecipes; m_CraftingRecipes = NULL;
+ delete m_FurnaceRecipe; m_FurnaceRecipe = nullptr;
+ delete m_CraftingRecipes; m_CraftingRecipes = nullptr;
LOGD("Unloading worlds...");
UnloadWorlds();
LOGD("Stopping plugin manager...");
- delete m_PluginManager; m_PluginManager = NULL;
+ delete m_PluginManager; m_PluginManager = nullptr;
cItemHandler::Deinit();
LOG("Cleaning up...");
- delete m_Server; m_Server = NULL;
+ delete m_Server; m_Server = nullptr;
LOG("Shutdown successful!");
}
@@ -319,7 +319,7 @@ void cRoot::LoadWorlds(cIniFile & IniFile)
cWorld * cRoot::CreateAndInitializeWorld(const AString & a_WorldName, eDimension a_Dimension, const AString & a_OverworldName)
{
cWorld * World = m_WorldsByName[a_WorldName];
- if (World != NULL)
+ if (World != nullptr)
{
return World;
}
@@ -364,7 +364,7 @@ void cRoot::StopWorlds(void)
void cRoot::UnloadWorlds(void)
{
- m_pDefaultWorld = NULL;
+ m_pDefaultWorld = nullptr;
for (WorldMap::iterator itr = m_WorldsByName.begin(); itr != m_WorldsByName.end(); ++itr)
{
delete itr->second;
@@ -397,7 +397,7 @@ cWorld * cRoot::GetWorld(const AString & a_WorldName, bool a_SearchForFolder)
{
return CreateAndInitializeWorld(a_WorldName);
}
- return NULL;
+ return nullptr;
}
@@ -409,7 +409,7 @@ bool cRoot::ForEachWorld(cWorldListCallback & a_Callback)
for (WorldMap::iterator itr = m_WorldsByName.begin(), itr2 = itr; itr != m_WorldsByName.end(); itr = itr2)
{
++itr2;
- if (itr->second != NULL)
+ if (itr->second != nullptr)
{
if (a_Callback.Item(itr->second))
{
@@ -544,7 +544,7 @@ void cRoot::BroadcastChat(const AString & a_Message, eMessageType a_ChatPrefix)
{
for (WorldMap::iterator itr = m_WorldsByName.begin(), end = m_WorldsByName.end(); itr != end; ++itr)
{
- itr->second->BroadcastChat(a_Message, NULL, a_ChatPrefix);
+ itr->second->BroadcastChat(a_Message, nullptr, a_ChatPrefix);
} // for itr - m_WorldsByName[]
}
@@ -614,7 +614,7 @@ bool cRoot::FindAndDoWithPlayer(const AString & a_PlayerName, cPlayerListCallbac
m_BestRating(0),
m_NameLength(a_PlayerName.length()),
m_PlayerName(a_PlayerName),
- m_BestMatch(NULL),
+ m_BestMatch(nullptr),
m_NumMatches(0)
{}