summaryrefslogtreecommitdiffstats
path: root/src/Root.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-05-08 20:16:35 +0200
committerMattes D <github@xoft.cz>2014-05-09 18:32:03 +0200
commitfb58ef55beddc73500029ae6c0fe08400de550d2 (patch)
tree8e36e0eba345faa98c499ac63f7bdeae5c02d9da /src/Root.cpp
parentInitialise m_HasTeleported in both constructors (diff)
downloadcuberite-fb58ef55beddc73500029ae6c0fe08400de550d2.tar
cuberite-fb58ef55beddc73500029ae6c0fe08400de550d2.tar.gz
cuberite-fb58ef55beddc73500029ae6c0fe08400de550d2.tar.bz2
cuberite-fb58ef55beddc73500029ae6c0fe08400de550d2.tar.lz
cuberite-fb58ef55beddc73500029ae6c0fe08400de550d2.tar.xz
cuberite-fb58ef55beddc73500029ae6c0fe08400de550d2.tar.zst
cuberite-fb58ef55beddc73500029ae6c0fe08400de550d2.zip
Diffstat (limited to 'src/Root.cpp')
-rw-r--r--src/Root.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/Root.cpp b/src/Root.cpp
index 5d32bdd87..c82b05a66 100644
--- a/src/Root.cpp
+++ b/src/Root.cpp
@@ -590,13 +590,13 @@ bool cRoot::FindAndDoWithPlayer(const AString & a_PlayerName, cPlayerListCallbac
{
class cCallback : public cPlayerListCallback
{
- unsigned m_BestRating;
- unsigned m_NameLength;
+ size_t m_BestRating;
+ size_t m_NameLength;
const AString m_PlayerName;
virtual bool Item (cPlayer * a_pPlayer)
{
- unsigned int Rating = RateCompareString (m_PlayerName, a_pPlayer->GetName());
+ size_t Rating = RateCompareString (m_PlayerName, a_pPlayer->GetName());
if ((Rating > 0) && (Rating >= m_BestRating))
{
m_BestMatch = a_pPlayer;
@@ -626,7 +626,7 @@ bool cRoot::FindAndDoWithPlayer(const AString & a_PlayerName, cPlayerListCallbac
cPlayer * m_BestMatch;
unsigned m_NumMatches;
} Callback (a_PlayerName);
- ForEachPlayer( Callback );
+ ForEachPlayer(Callback);
if (Callback.m_NumMatches == 1)
{
@@ -763,8 +763,8 @@ void cRoot::LogChunkStats(cCommandOutputCallback & a_Output)
{
cWorld * World = itr->second;
int NumInGenerator = World->GetGeneratorQueueLength();
- int NumInSaveQueue = World->GetStorageSaveQueueLength();
- int NumInLoadQueue = World->GetStorageLoadQueueLength();
+ int NumInSaveQueue = (int)World->GetStorageSaveQueueLength();
+ int NumInLoadQueue = (int)World->GetStorageLoadQueueLength();
int NumValid = 0;
int NumDirty = 0;
int NumInLighting = 0;
@@ -784,8 +784,6 @@ void cRoot::LogChunkStats(cCommandOutputCallback & a_Output)
a_Output.Out(" block lighting: " SIZE_T_FMT_PRECISION(6) " bytes (" SIZE_T_FMT_PRECISION(3) " KiB)", 2 * sizeof(cChunkDef::BlockNibbles), (2 * sizeof(cChunkDef::BlockNibbles) + 1023) / 1024);
a_Output.Out(" heightmap: " SIZE_T_FMT_PRECISION(6) " bytes (" SIZE_T_FMT_PRECISION(3) " KiB)", sizeof(cChunkDef::HeightMap), (sizeof(cChunkDef::HeightMap) + 1023) / 1024);
a_Output.Out(" biomemap: " SIZE_T_FMT_PRECISION(6) " bytes (" SIZE_T_FMT_PRECISION(3) " KiB)", sizeof(cChunkDef::BiomeMap), (sizeof(cChunkDef::BiomeMap) + 1023) / 1024);
- int Rest = sizeof(cChunk) - sizeof(cChunkDef::BlockTypes) - 3 * sizeof(cChunkDef::BlockNibbles) - sizeof(cChunkDef::HeightMap) - sizeof(cChunkDef::BiomeMap);
- a_Output.Out(" other: %6d bytes (%3d KiB)", Rest, (Rest + 1023) / 1024);
SumNumValid += NumValid;
SumNumDirty += NumDirty;
SumNumInLighting += NumInLighting;