summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/World/Level.cpp4
-rw-r--r--src/World/Level.hpp3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/World/Level.cpp b/src/World/Level.cpp
index 8cd396e..56628b9 100644
--- a/src/World/Level.cpp
+++ b/src/World/Level.cpp
@@ -29,14 +29,12 @@
#include "../Util.hpp"
#include "../NBT/IntTag.hpp"
-#include <iostream>
-
namespace MinedMap {
namespace World {
Level::Level(const char *filename) {
- std::vector<uint8_t> buffer = readGZip(filename);
+ buffer = readGZip(filename);
Buffer nbt(buffer.data(), buffer.size());
std::pair<std::string, std::shared_ptr<const NBT::Tag>> tag = NBT::Tag::readNamedTag(&nbt);
diff --git a/src/World/Level.hpp b/src/World/Level.hpp
index 6cdfc4e..6fd45a8 100644
--- a/src/World/Level.hpp
+++ b/src/World/Level.hpp
@@ -29,6 +29,7 @@
#include "../NBT/CompoundTag.hpp"
#include <cstdint>
+#include <vector>
namespace MinedMap {
@@ -36,6 +37,8 @@ namespace World {
class Level {
private:
+ std::vector<uint8_t> buffer;
+
std::shared_ptr<const NBT::CompoundTag> root;
std::shared_ptr<const NBT::CompoundTag> data;