From 804805d35a87c2acc9425d1762ad26b1ba2ec9ac Mon Sep 17 00:00:00 2001 From: Samuel Barney Date: Wed, 29 Jul 2015 09:04:03 -0600 Subject: Silenced and fixed many warning messages across multiple files. --- src/Root.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Root.cpp') 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(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(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(World->GetStorageSaveQueueLength()); + int NumInLoadQueue = static_cast(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(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); -- cgit v1.2.3