summaryrefslogtreecommitdiffstats
path: root/source/WSSCompact.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-05 17:43:06 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-05 17:43:06 +0100
commit01c5d6e1287994a59686dc290b00fbaabe22aa33 (patch)
treef4ee2864452f136e7a87a0a512a0b4862eb6d5cb /source/WSSCompact.cpp
parentChunkSender: Chunks are now compressed and sent to clients from a separate threads, proper passive waiting between threads. Not much tested, just appears to work :) (diff)
downloadcuberite-01c5d6e1287994a59686dc290b00fbaabe22aa33.tar
cuberite-01c5d6e1287994a59686dc290b00fbaabe22aa33.tar.gz
cuberite-01c5d6e1287994a59686dc290b00fbaabe22aa33.tar.bz2
cuberite-01c5d6e1287994a59686dc290b00fbaabe22aa33.tar.lz
cuberite-01c5d6e1287994a59686dc290b00fbaabe22aa33.tar.xz
cuberite-01c5d6e1287994a59686dc290b00fbaabe22aa33.tar.zst
cuberite-01c5d6e1287994a59686dc290b00fbaabe22aa33.zip
Diffstat (limited to 'source/WSSCompact.cpp')
-rw-r--r--source/WSSCompact.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/WSSCompact.cpp b/source/WSSCompact.cpp
index 76eb780f9..bc9db415c 100644
--- a/source/WSSCompact.cpp
+++ b/source/WSSCompact.cpp
@@ -455,6 +455,7 @@ void cWSSCompact::cPAKFile::UpdateChunk1To2()
// Old version is 128 blocks high with YZX axis order
AString ConvertedData;
+ ConvertedData.reserve(cChunk::c_BlockDataSize); // Pre-alloc, so that push_back() and append() don't need to re-alloc
unsigned int InChunkOffset = 0;
for( int x = 0; x < 16; ++x ) for( int z = 0; z < 16; ++z )
{
@@ -524,6 +525,7 @@ void cWSSCompact::cPAKFile::UpdateChunk1To2()
// Done converting
m_DataContents = NewDataContents;
m_ChunkVersion = 2;
+ LOGINFO("Updated \"%s\" version 1 to version 2", m_FileName.c_str() );
}