diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-10-23 14:59:42 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-10-23 14:59:42 +0200 |
commit | 72bb299a4a4f74840c3b368c6669ddc3d32006ee (patch) | |
tree | 748fee756010b1f36aa95162f762e21ee0d19c0a /src/Scoreboard.cpp | |
parent | Merge branch 'master' into ChunkLoader (diff) | |
parent | Fixed a crash in redstone simulator. (diff) | |
download | cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.tar cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.tar.gz cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.tar.bz2 cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.tar.lz cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.tar.xz cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.tar.zst cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.zip |
Diffstat (limited to 'src/Scoreboard.cpp')
-rw-r--r-- | src/Scoreboard.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/Scoreboard.cpp b/src/Scoreboard.cpp index def952029..adce8b549 100644 --- a/src/Scoreboard.cpp +++ b/src/Scoreboard.cpp @@ -278,7 +278,7 @@ cScoreboard::cScoreboard(cWorld * a_World) : m_World(a_World) { for (int i = 0; i < (int) dsCount; ++i) { - m_Display[i] = NULL; + m_Display[i] = nullptr; } } @@ -294,14 +294,14 @@ cObjective* cScoreboard::RegisterObjective(const AString & a_Name, const AString if (Status.second) { - ASSERT(m_World != NULL); + ASSERT(m_World != nullptr); m_World->BroadcastScoreboardObjective(a_Name, a_DisplayName, 0); return &Status.first->second; } else { - return NULL; + return nullptr; } } @@ -320,14 +320,14 @@ bool cScoreboard::RemoveObjective(const AString & a_Name) return false; } - ASSERT(m_World != NULL); + ASSERT(m_World != nullptr); m_World->BroadcastScoreboardObjective(it->second.GetName(), it->second.GetDisplayName(), 1); for (unsigned int i = 0; i < (unsigned int) dsCount; ++i) { if (m_Display[i] == &it->second) { - SetDisplay(NULL, (eDisplaySlot) i); + SetDisplay(nullptr, (eDisplaySlot) i); } } @@ -348,7 +348,7 @@ cObjective * cScoreboard::GetObjective(const AString & a_Name) if (it == m_Objectives.end()) { - return NULL; + return nullptr; } else { @@ -369,7 +369,7 @@ cTeam * cScoreboard::RegisterTeam( std::pair<cTeamMap::iterator, bool> Status = m_Teams.insert(cNamedTeam(a_Name, Team)); - return Status.second ? &Status.first->second : NULL; + return Status.second ? &Status.first->second : nullptr; } @@ -404,7 +404,7 @@ cTeam * cScoreboard::GetTeam(const AString & a_Name) if (it == m_Teams.end()) { - return NULL; + return nullptr; } else { @@ -428,7 +428,7 @@ cTeam * cScoreboard::QueryPlayerTeam(const AString & a_Name) } } - return NULL; + return nullptr; } @@ -452,7 +452,7 @@ void cScoreboard::SetDisplay(cObjective * a_Objective, eDisplaySlot a_Slot) { m_Display[a_Slot] = a_Objective; - ASSERT(m_World != NULL); + ASSERT(m_World != nullptr); m_World->BroadcastDisplayObjective(a_Objective ? a_Objective->GetName() : "", a_Slot); } |