summaryrefslogtreecommitdiffstats
path: root/src/Scoreboard.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-10-20 22:55:07 +0200
committerarchshift <admin@archshift.com>2014-10-23 05:12:49 +0200
commita26541a7c3ced0569098edd0aae61c097c2912f4 (patch)
tree4b7bea204c0ddd18bb4f95357f9eb77590bc2e8d /src/Scoreboard.cpp
parentComposableGenerator: Removed nullptr initializers. (diff)
downloadcuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.tar
cuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.tar.gz
cuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.tar.bz2
cuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.tar.lz
cuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.tar.xz
cuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.tar.zst
cuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.zip
Diffstat (limited to 'src/Scoreboard.cpp')
-rw-r--r--src/Scoreboard.cpp20
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);
}