diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-03-05 17:43:06 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-03-05 17:43:06 +0100 |
commit | 01c5d6e1287994a59686dc290b00fbaabe22aa33 (patch) | |
tree | f4ee2864452f136e7a87a0a512a0b4862eb6d5cb /source/WSSCompact.cpp | |
parent | ChunkSender: 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) | |
download | cuberite-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 '')
-rw-r--r-- | source/WSSCompact.cpp | 2 |
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() );
}
|