diff options
author | HaoTNN <haotnn@gmail.com> | 2015-06-03 01:08:57 +0200 |
---|---|---|
committer | HaoTNN <haotnn@gmail.com> | 2015-06-03 01:08:57 +0200 |
commit | 3142598dee31acc23c738a1a728638665c8940b8 (patch) | |
tree | 2eb837ed785678d536d677ff5020fabca089f2e5 /src/Scoreboard.cpp | |
parent | Merge remote-tracking branch 'upstream/master' (diff) | |
parent | Merge pull request #2182 from birkett/master (diff) | |
download | cuberite-3142598dee31acc23c738a1a728638665c8940b8.tar cuberite-3142598dee31acc23c738a1a728638665c8940b8.tar.gz cuberite-3142598dee31acc23c738a1a728638665c8940b8.tar.bz2 cuberite-3142598dee31acc23c738a1a728638665c8940b8.tar.lz cuberite-3142598dee31acc23c738a1a728638665c8940b8.tar.xz cuberite-3142598dee31acc23c738a1a728638665c8940b8.tar.zst cuberite-3142598dee31acc23c738a1a728638665c8940b8.zip |
Diffstat (limited to 'src/Scoreboard.cpp')
-rw-r--r-- | src/Scoreboard.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Scoreboard.cpp b/src/Scoreboard.cpp index a4a4c3391..9f251ab94 100644 --- a/src/Scoreboard.cpp +++ b/src/Scoreboard.cpp @@ -276,7 +276,7 @@ size_t cTeam::GetNumPlayers(void) const cScoreboard::cScoreboard(cWorld * a_World) : m_World(a_World) { - for (int i = 0; i < (int) dsCount; ++i) + for (int i = 0; i < static_cast<int>(dsCount); ++i) { m_Display[i] = nullptr; } @@ -323,11 +323,11 @@ bool cScoreboard::RemoveObjective(const AString & a_Name) ASSERT(m_World != nullptr); m_World->BroadcastScoreboardObjective(it->second.GetName(), it->second.GetDisplayName(), 1); - for (unsigned int i = 0; i < (unsigned int) dsCount; ++i) + for (unsigned int i = 0; i < static_cast<unsigned int>(dsCount); ++i) { if (m_Display[i] == &it->second) { - SetDisplay(nullptr, (eDisplaySlot) i); + SetDisplay(nullptr, static_cast<eDisplaySlot>(i)); } } @@ -557,14 +557,14 @@ void cScoreboard::SendTo(cClientHandle & a_Client) it->second.SendTo(a_Client); } - for (int i = 0; i < (int) dsCount; ++i) + for (int i = 0; i < static_cast<int>(dsCount); ++i) { // Avoid race conditions cObjective * Objective = m_Display[i]; if (Objective) { - a_Client.SendDisplayObjective(Objective->GetName(), (eDisplaySlot) i); + a_Client.SendDisplayObjective(Objective->GetName(), static_cast<eDisplaySlot>(i)); } } } |