summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/SchematicFileSerializer.cpp
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-03-08 16:14:22 +0100
committerTycho <work.tycho+git@gmail.com>2014-03-08 16:14:22 +0100
commitc4c58c71fb0d38c2b13752810db0f52ba07c0af0 (patch)
tree0cc1bb8bd0fa5655bd86c6befaa71fec885da665 /src/WorldStorage/SchematicFileSerializer.cpp
parentTurned on Werror (diff)
parentMerge branch 'master' into warnings (diff)
downloadcuberite-c4c58c71fb0d38c2b13752810db0f52ba07c0af0.tar
cuberite-c4c58c71fb0d38c2b13752810db0f52ba07c0af0.tar.gz
cuberite-c4c58c71fb0d38c2b13752810db0f52ba07c0af0.tar.bz2
cuberite-c4c58c71fb0d38c2b13752810db0f52ba07c0af0.tar.lz
cuberite-c4c58c71fb0d38c2b13752810db0f52ba07c0af0.tar.xz
cuberite-c4c58c71fb0d38c2b13752810db0f52ba07c0af0.tar.zst
cuberite-c4c58c71fb0d38c2b13752810db0f52ba07c0af0.zip
Diffstat (limited to 'src/WorldStorage/SchematicFileSerializer.cpp')
-rw-r--r--src/WorldStorage/SchematicFileSerializer.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/WorldStorage/SchematicFileSerializer.cpp b/src/WorldStorage/SchematicFileSerializer.cpp
index a6ae8d8e0..b021aeb0c 100644
--- a/src/WorldStorage/SchematicFileSerializer.cpp
+++ b/src/WorldStorage/SchematicFileSerializer.cpp
@@ -103,7 +103,7 @@ bool cSchematicFileSerializer::SaveToSchematicFile(const cBlockArea & a_BlockAre
-AString cSchematicFileSerializer::SaveToSchematicString(const cBlockArea & a_BlockArea)
+bool cSchematicFileSerializer::SaveToSchematicString(const cBlockArea & a_BlockArea, AString & a_Out)
{
// Serialize into NBT data:
AString NBT = SaveToSchematicNBT(a_BlockArea);
@@ -114,14 +114,13 @@ AString cSchematicFileSerializer::SaveToSchematicString(const cBlockArea & a_Blo
}
// Gzip the data:
- AString Compressed;
- int res = CompressStringGZIP(NBT.data(), NBT.size(), Compressed);
+ int res = CompressStringGZIP(NBT.data(), NBT.size(), a_Out);
if (res != Z_OK)
{
LOG("%s: Cannot Gzip the area data NBT representation: %d", __FUNCTION__, res);
return false;
}
- return Compressed;
+ return true;
}