From 1b9fd75fad70da33ad6b31a0da5f6b1c6d074849 Mon Sep 17 00:00:00 2001 From: ljfa-ag Date: Wed, 12 Aug 2015 19:17:59 +0200 Subject: Implement write_payload and write_tag --- src/io/stream_writer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/io/stream_writer.cpp') diff --git a/src/io/stream_writer.cpp b/src/io/stream_writer.cpp index 26a6a7eb65..f21fdb701c 100644 --- a/src/io/stream_writer.cpp +++ b/src/io/stream_writer.cpp @@ -25,9 +25,11 @@ namespace nbt namespace io { -void stream_writer::write_type(tag_type tt) +void stream_writer::write_tag(const std::string& key, const tag& t) { - write_num(static_cast(tt)); + write_type(t.get_type()); + write_string(key); + write_payload(t); } void stream_writer::write_string(const std::string& str) -- cgit 0.0.5-2-1-g0f52