From f4201e0b825479c6ae8ff3165fc0b7fa949c0006 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sun, 9 Mar 2014 09:25:16 -0700 Subject: Fixed gcc error --- src/WorldStorage/WSSCompact.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/WorldStorage/WSSCompact.cpp') diff --git a/src/WorldStorage/WSSCompact.cpp b/src/WorldStorage/WSSCompact.cpp index 5e49e4909..4301e1733 100644 --- a/src/WorldStorage/WSSCompact.cpp +++ b/src/WorldStorage/WSSCompact.cpp @@ -39,7 +39,7 @@ struct cWSSCompact::sChunkHeader /// The maximum number of PAK files that are cached -const int MAX_PAK_FILES = 16; +const int MAX_PAK_FILES = 16U; /// The maximum number of unsaved chunks before the cPAKFile saves them to disk const int MAX_DIRTY_CHUNKS = 16; -- cgit v1.2.3 From e73caf30f09248a7e428a937226e0383e69ff6ce Mon Sep 17 00:00:00 2001 From: Tycho Date: Sun, 9 Mar 2014 09:33:40 -0700 Subject: Fix gcc error attempt 2 --- src/WorldStorage/WSSCompact.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/WorldStorage/WSSCompact.cpp') diff --git a/src/WorldStorage/WSSCompact.cpp b/src/WorldStorage/WSSCompact.cpp index 4301e1733..885099713 100644 --- a/src/WorldStorage/WSSCompact.cpp +++ b/src/WorldStorage/WSSCompact.cpp @@ -39,7 +39,7 @@ struct cWSSCompact::sChunkHeader /// The maximum number of PAK files that are cached -const int MAX_PAK_FILES = 16U; +const int MAX_PAK_FILES = static_cast(16); /// The maximum number of unsaved chunks before the cPAKFile saves them to disk const int MAX_DIRTY_CHUNKS = 16; -- cgit v1.2.3 From ebf163b77a030553c616d19179a9cd0f6de787a6 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sun, 9 Mar 2014 09:45:59 -0700 Subject: Unsigned types take 3 --- src/WorldStorage/WSSCompact.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/WorldStorage/WSSCompact.cpp') diff --git a/src/WorldStorage/WSSCompact.cpp b/src/WorldStorage/WSSCompact.cpp index 885099713..663260aaa 100644 --- a/src/WorldStorage/WSSCompact.cpp +++ b/src/WorldStorage/WSSCompact.cpp @@ -39,7 +39,7 @@ struct cWSSCompact::sChunkHeader /// The maximum number of PAK files that are cached -const int MAX_PAK_FILES = static_cast(16); +const int MAX_PAK_FILES = static_cast(16); /// The maximum number of unsaved chunks before the cPAKFile saves them to disk const int MAX_DIRTY_CHUNKS = 16; -- cgit v1.2.3 From 167ef3b7a1a1ec23330552decfc7d005ccfc8caa Mon Sep 17 00:00:00 2001 From: Tycho Date: Sun, 9 Mar 2014 09:52:49 -0700 Subject: Take 4 --- src/WorldStorage/WSSCompact.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/WorldStorage/WSSCompact.cpp') diff --git a/src/WorldStorage/WSSCompact.cpp b/src/WorldStorage/WSSCompact.cpp index 663260aaa..6e39b44cc 100644 --- a/src/WorldStorage/WSSCompact.cpp +++ b/src/WorldStorage/WSSCompact.cpp @@ -39,7 +39,7 @@ struct cWSSCompact::sChunkHeader /// The maximum number of PAK files that are cached -const int MAX_PAK_FILES = static_cast(16); +const int MAX_PAK_FILES = static_cast(16); /// The maximum number of unsaved chunks before the cPAKFile saves them to disk const int MAX_DIRTY_CHUNKS = 16; -- cgit v1.2.3 From 02afa78b681838db5d83378836c88895b6fba237 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sun, 9 Mar 2014 10:04:07 -0700 Subject: Take 5 --- src/WorldStorage/WSSCompact.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/WorldStorage/WSSCompact.cpp') diff --git a/src/WorldStorage/WSSCompact.cpp b/src/WorldStorage/WSSCompact.cpp index 6e39b44cc..18d4452d9 100644 --- a/src/WorldStorage/WSSCompact.cpp +++ b/src/WorldStorage/WSSCompact.cpp @@ -39,7 +39,7 @@ struct cWSSCompact::sChunkHeader /// The maximum number of PAK files that are cached -const int MAX_PAK_FILES = static_cast(16); +const int MAX_PAK_FILES = static_cast(16); /// The maximum number of unsaved chunks before the cPAKFile saves them to disk const int MAX_DIRTY_CHUNKS = 16; -- cgit v1.2.3 From 430aba9f1dc5db8c3d1ec9f9552bb41f8a0b21b0 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sun, 9 Mar 2014 10:10:36 -0700 Subject: Its a const not a macro --- src/WorldStorage/WSSCompact.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/WorldStorage/WSSCompact.cpp') diff --git a/src/WorldStorage/WSSCompact.cpp b/src/WorldStorage/WSSCompact.cpp index 18d4452d9..95477838e 100644 --- a/src/WorldStorage/WSSCompact.cpp +++ b/src/WorldStorage/WSSCompact.cpp @@ -39,7 +39,7 @@ struct cWSSCompact::sChunkHeader /// The maximum number of PAK files that are cached -const int MAX_PAK_FILES = static_cast(16); +const size_t MAX_PAK_FILES = 16; /// The maximum number of unsaved chunks before the cPAKFile saves them to disk const int MAX_DIRTY_CHUNKS = 16; -- cgit v1.2.3 From cff66315137e90db1292fa01640aae2e2d23b862 Mon Sep 17 00:00:00 2001 From: Tycho Date: Mon, 10 Mar 2014 11:14:34 -0700 Subject: Removed unused macro from WSSCompact --- src/WorldStorage/WSSCompact.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/WorldStorage/WSSCompact.cpp') diff --git a/src/WorldStorage/WSSCompact.cpp b/src/WorldStorage/WSSCompact.cpp index 95477838e..1e84fb4ad 100644 --- a/src/WorldStorage/WSSCompact.cpp +++ b/src/WorldStorage/WSSCompact.cpp @@ -764,7 +764,6 @@ void cWSSCompact::cPAKFile::UpdateChunk2To3() // Cannot use cChunk::MakeIndex because it might change again????????? // For compatibility, use what we know is current - #define MAKE_2_INDEX( x, y, z ) ( y + (z * 256) + (x * 256 * 16) ) #define MAKE_3_INDEX( x, y, z ) ( x + (z * 16) + (y * 16 * 16) ) unsigned int InChunkOffset = 0; -- cgit v1.2.3 From 16b27c4b7ae2ccb03355148fa7fc7116190cc5fb Mon Sep 17 00:00:00 2001 From: Tycho Date: Tue, 11 Mar 2014 14:16:08 -0700 Subject: Fixed a load of format string errors --- src/WorldStorage/WSSCompact.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/WorldStorage/WSSCompact.cpp') diff --git a/src/WorldStorage/WSSCompact.cpp b/src/WorldStorage/WSSCompact.cpp index 1e84fb4ad..b1e8d12b7 100644 --- a/src/WorldStorage/WSSCompact.cpp +++ b/src/WorldStorage/WSSCompact.cpp @@ -569,7 +569,7 @@ void cWSSCompact::cPAKFile::UpdateChunk1To2() if( ChunksConverted % 32 == 0 ) { - LOGINFO("Updating \"%s\" version 1 to version 2: %d %%", m_FileName.c_str(), (ChunksConverted * 100) / m_ChunkHeaders.size() ); + LOGINFO("Updating \"%s\" version 1 to version 2: %zu %%", m_FileName.c_str(), (ChunksConverted * 100) / m_ChunkHeaders.size() ); } ChunksConverted++; @@ -607,7 +607,7 @@ void cWSSCompact::cPAKFile::UpdateChunk1To2() if (UncompressedSize != (int)UncompressedData.size()) { - LOGWARNING("Uncompressed data size differs (exp %d bytes, got %d) for chunk [%d, %d]", + LOGWARNING("Uncompressed data size differs (exp %d bytes, got %zu) for chunk [%d, %d]", UncompressedSize, UncompressedData.size(), Header->m_ChunkX, Header->m_ChunkZ ); @@ -713,7 +713,7 @@ void cWSSCompact::cPAKFile::UpdateChunk2To3() if( ChunksConverted % 32 == 0 ) { - LOGINFO("Updating \"%s\" version 2 to version 3: %d %%", m_FileName.c_str(), (ChunksConverted * 100) / m_ChunkHeaders.size() ); + LOGINFO("Updating \"%s\" version 2 to version 3: %zu %%", m_FileName.c_str(), (ChunksConverted * 100) / m_ChunkHeaders.size() ); } ChunksConverted++; @@ -751,7 +751,7 @@ void cWSSCompact::cPAKFile::UpdateChunk2To3() if (UncompressedSize != (int)UncompressedData.size()) { - LOGWARNING("Uncompressed data size differs (exp %d bytes, got %d) for chunk [%d, %d]", + LOGWARNING("Uncompressed data size differs (exp %d bytes, got %zu) for chunk [%d, %d]", UncompressedSize, UncompressedData.size(), Header->m_ChunkX, Header->m_ChunkZ ); @@ -866,7 +866,7 @@ bool cWSSCompact::LoadChunkFromData(const cChunkCoords & a_Chunk, int & a_Uncomp if (a_UncompressedSize != (int)UncompressedData.size()) { - LOGWARNING("Uncompressed data size differs (exp %d bytes, got %d) for chunk [%d, %d]", + LOGWARNING("Uncompressed data size differs (exp %d bytes, got %zu) for chunk [%d, %d]", a_UncompressedSize, UncompressedData.size(), a_Chunk.m_ChunkX, a_Chunk.m_ChunkZ ); -- cgit v1.2.3 From 862e2194433b5d47aaf88261091b35a1ee663482 Mon Sep 17 00:00:00 2001 From: Tycho Date: Wed, 12 Mar 2014 10:34:50 -0700 Subject: Added additional macros to support the MSVC size_t format and changed all formats to use the macros --- src/WorldStorage/WSSCompact.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/WorldStorage/WSSCompact.cpp') diff --git a/src/WorldStorage/WSSCompact.cpp b/src/WorldStorage/WSSCompact.cpp index b1e8d12b7..bb9d4b9e6 100644 --- a/src/WorldStorage/WSSCompact.cpp +++ b/src/WorldStorage/WSSCompact.cpp @@ -569,7 +569,7 @@ void cWSSCompact::cPAKFile::UpdateChunk1To2() if( ChunksConverted % 32 == 0 ) { - LOGINFO("Updating \"%s\" version 1 to version 2: %zu %%", m_FileName.c_str(), (ChunksConverted * 100) / m_ChunkHeaders.size() ); + LOGINFO("Updating \"%s\" version 1 to version 2: " SIZE_T_FMT " %%", m_FileName.c_str(), (ChunksConverted * 100) / m_ChunkHeaders.size() ); } ChunksConverted++; @@ -607,7 +607,7 @@ void cWSSCompact::cPAKFile::UpdateChunk1To2() if (UncompressedSize != (int)UncompressedData.size()) { - LOGWARNING("Uncompressed data size differs (exp %d bytes, got %zu) for chunk [%d, %d]", + LOGWARNING("Uncompressed data size differs (exp %d bytes, got " SIZE_T_FMT ") for chunk [%d, %d]", UncompressedSize, UncompressedData.size(), Header->m_ChunkX, Header->m_ChunkZ ); @@ -713,7 +713,7 @@ void cWSSCompact::cPAKFile::UpdateChunk2To3() if( ChunksConverted % 32 == 0 ) { - LOGINFO("Updating \"%s\" version 2 to version 3: %zu %%", m_FileName.c_str(), (ChunksConverted * 100) / m_ChunkHeaders.size() ); + LOGINFO("Updating \"%s\" version 2 to version 3: " SIZE_T_FMT " %%", m_FileName.c_str(), (ChunksConverted * 100) / m_ChunkHeaders.size() ); } ChunksConverted++; @@ -751,7 +751,7 @@ void cWSSCompact::cPAKFile::UpdateChunk2To3() if (UncompressedSize != (int)UncompressedData.size()) { - LOGWARNING("Uncompressed data size differs (exp %d bytes, got %zu) for chunk [%d, %d]", + LOGWARNING("Uncompressed data size differs (exp %d bytes, got " SIZE_T_FMT ") for chunk [%d, %d]", UncompressedSize, UncompressedData.size(), Header->m_ChunkX, Header->m_ChunkZ ); @@ -866,7 +866,7 @@ bool cWSSCompact::LoadChunkFromData(const cChunkCoords & a_Chunk, int & a_Uncomp if (a_UncompressedSize != (int)UncompressedData.size()) { - LOGWARNING("Uncompressed data size differs (exp %d bytes, got %zu) for chunk [%d, %d]", + LOGWARNING("Uncompressed data size differs (exp %d bytes, got " SIZE_T_FMT ") for chunk [%d, %d]", a_UncompressedSize, UncompressedData.size(), a_Chunk.m_ChunkX, a_Chunk.m_ChunkZ ); -- cgit v1.2.3