diff options
author | Samuel Barney <samjbarney@gmail.com> | 2015-07-29 17:04:03 +0200 |
---|---|---|
committer | Samuel Barney <samjbarney@gmail.com> | 2015-07-29 17:49:30 +0200 |
commit | 804805d35a87c2acc9425d1762ad26b1ba2ec9ac (patch) | |
tree | 13b603c8bbf8177da92ce87f5413fb646d204f3f /src/Root.cpp | |
parent | Merge pull request #2376 from mjhanninen/fix-freebsd-build (diff) | |
download | cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar.gz cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar.bz2 cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar.lz cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar.xz cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar.zst cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Root.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Root.cpp b/src/Root.cpp index 3ba391b7f..cfd609c39 100644 --- a/src/Root.cpp +++ b/src/Root.cpp @@ -760,7 +760,7 @@ int cRoot::GetVirtualRAMUsage(void) &t_info_count )) { - return (int)(t_info.virtual_size / 1024); + return static_cast<int>(t_info.virtual_size / 1024); } return -1; #else @@ -812,7 +812,7 @@ int cRoot::GetPhysicalRAMUsage(void) &t_info_count )) { - return (int)(t_info.resident_size / 1024); + return static_cast<int>(t_info.resident_size / 1024); } return -1; #else @@ -836,8 +836,8 @@ void cRoot::LogChunkStats(cCommandOutputCallback & a_Output) { cWorld * World = itr->second; int NumInGenerator = World->GetGeneratorQueueLength(); - int NumInSaveQueue = (int)World->GetStorageSaveQueueLength(); - int NumInLoadQueue = (int)World->GetStorageLoadQueueLength(); + int NumInSaveQueue = static_cast<int>(World->GetStorageSaveQueueLength()); + int NumInLoadQueue = static_cast<int>(World->GetStorageLoadQueueLength()); int NumValid = 0; int NumDirty = 0; int NumInLighting = 0; @@ -849,7 +849,7 @@ void cRoot::LogChunkStats(cCommandOutputCallback & a_Output) a_Output.Out(" Num chunks in generator queue: %d", NumInGenerator); a_Output.Out(" Num chunks in storage load queue: %d", NumInLoadQueue); a_Output.Out(" Num chunks in storage save queue: %d", NumInSaveQueue); - int Mem = NumValid * sizeof(cChunk); + int Mem = NumValid * static_cast<int>(sizeof(cChunk)); a_Output.Out(" Memory used by chunks: %d KiB (%d MiB)", (Mem + 1023) / 1024, (Mem + 1024 * 1024 - 1) / (1024 * 1024)); a_Output.Out(" Per-chunk memory size breakdown:"); a_Output.Out(" block types: " SIZE_T_FMT_PRECISION(6) " bytes (" SIZE_T_FMT_PRECISION(3) " KiB)", sizeof(cChunkDef::BlockTypes), (sizeof(cChunkDef::BlockTypes) + 1023) / 1024); |