diff options
Diffstat (limited to 'src/World')
-rw-r--r-- | src/World/Chunk.cpp | 1 | ||||
-rw-r--r-- | src/World/Chunk.hpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/World/Chunk.cpp b/src/World/Chunk.cpp index fb46466..db286ee 100644 --- a/src/World/Chunk.cpp +++ b/src/World/Chunk.cpp @@ -82,7 +82,6 @@ Chunk::Chunk(uint8_t *buffer, size_t buflen) { if (format != 2) throw std::invalid_argument("unknown chunk format"); - UniqueCPtr<uint8_t[]> data; size_t len; std::tie(data, len) = inflateChunk(buffer+5, size-1); diff --git a/src/World/Chunk.hpp b/src/World/Chunk.hpp index 3ed6cf4..5b0ecdb 100644 --- a/src/World/Chunk.hpp +++ b/src/World/Chunk.hpp @@ -43,6 +43,8 @@ public: static const size_t SIZE = 16; private: + UniqueCPtr<uint8_t[]> data; + static std::pair<UniqueCPtr<uint8_t[]>, size_t> inflateChunk(uint8_t *data, size_t len); std::shared_ptr<const NBT::ListTag<NBT::CompoundTag>> sections; |