From c13b1931ff26a5643c9fe68ab32b1e362cfacd70 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sat, 9 May 2015 09:25:09 +0200 Subject: More style checking. Spaces around some operators are checked. --- src/WorldStorage/WSSAnvil.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/WorldStorage/WSSAnvil.cpp') diff --git a/src/WorldStorage/WSSAnvil.cpp b/src/WorldStorage/WSSAnvil.cpp index 948a0c9a0..f389e7cbf 100755 --- a/src/WorldStorage/WSSAnvil.cpp +++ b/src/WorldStorage/WSSAnvil.cpp @@ -95,7 +95,7 @@ cWSSAnvil::cWSSAnvil(cWorld * a_World, int a_CompressionFactor) : { // Create a level.dat file for mapping tools, if it doesn't already exist: AString fnam; - Printf(fnam, "%s/level.dat", a_World->GetName().c_str()); + Printf(fnam, "%s%clevel.dat", a_World->GetName().c_str(), cFile::PathSeparator); if (!cFile::Exists(fnam)) { cFastNBTWriter Writer; @@ -251,7 +251,7 @@ cWSSAnvil::cMCAFile * cWSSAnvil::LoadMCAFile(const cChunkCoords & a_Chunk) // Load it anew: AString FileName; - Printf(FileName, "%s/region", m_World->GetName().c_str()); + Printf(FileName, "%s%cregion", m_World->GetName().c_str(), cFile::PathSeparator); cFile::CreateFolder(FILE_IO_PREFIX + FileName); AppendPrintf(FileName, "/r.%d.%d.mca", RegionX, RegionZ); cMCAFile * f = new cMCAFile(FileName, RegionX, RegionZ); @@ -323,7 +323,7 @@ bool cWSSAnvil::SaveChunkToData(const cChunkCoords & a_Chunk, AString & a_Data) bool cWSSAnvil::LoadChunkFromNBT(const cChunkCoords & a_Chunk, const cParsedNBT & a_NBT) { - // The data arrays, in MCA-native y/z/x ordering (will be reordered for the final chunk data) + // The data arrays, in MCA-native y / z / x ordering (will be reordered for the final chunk data) cChunkDef::BlockTypes BlockTypes; cChunkDef::BlockNibbles MetaData; cChunkDef::BlockNibbles BlockLight; @@ -879,7 +879,7 @@ cBlockEntity * cWSSAnvil::LoadBeaconFromNBT(const cParsedNBT & a_NBT, int a_TagI Beacon->SetSecondaryEffect((cEntityEffect::eType)a_NBT.GetInt(CurrentLine)); } - // We are better than mojang, we load/save the beacon inventory! + // We are better than mojang, we load / save the beacon inventory! int Items = a_NBT.FindChildByName(a_TagIdx, "Items"); if ((Items >= 0) && (a_NBT.GetType(Items) == TAG_List)) { -- cgit v1.2.3 From 846d16315a8b5a81fbc37d66da4d1254038ec494 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sat, 9 May 2015 11:16:56 +0200 Subject: CheckBasicStyle: checks spaces around * and &. --- src/WorldStorage/WSSAnvil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/WorldStorage/WSSAnvil.cpp') diff --git a/src/WorldStorage/WSSAnvil.cpp b/src/WorldStorage/WSSAnvil.cpp index f389e7cbf..392b9bf83 100755 --- a/src/WorldStorage/WSSAnvil.cpp +++ b/src/WorldStorage/WSSAnvil.cpp @@ -3148,7 +3148,7 @@ bool cWSSAnvil::cMCAFile::SetChunkData(const cChunkCoords & a_Chunk, const AStri } // Store the header: - ChunkSize = ((u_long)a_Data.size() + MCA_CHUNK_HEADER_LENGTH + 4095) / 4096; // Round data size *up* to nearest 4KB sector, make it a sector number + ChunkSize = ((u_long)a_Data.size() + MCA_CHUNK_HEADER_LENGTH + 4095) / 4096; // Round data size up to nearest 4KB sector, make it a sector number if (ChunkSize > 255) { LOGWARNING("Cannot save chunk [%d, %d], the data is too large (%u KiB, maximum is 1024 KiB). Remove some entities and retry.", -- cgit v1.2.3