From 9c2cea3e85872e1e5005b51b16fa1e6876bf1011 Mon Sep 17 00:00:00 2001 From: ljfa-ag Date: Tue, 11 Aug 2015 11:26:22 +0200 Subject: Add json_formatter argument to json_fmt_visitor which will be useful later when it becomes configurable --- src/text/json_formatter.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/text/json_formatter.cpp') diff --git a/src/text/json_formatter.cpp b/src/text/json_formatter.cpp index 44acd61713..543a9db583 100644 --- a/src/text/json_formatter.cpp +++ b/src/text/json_formatter.cpp @@ -35,7 +35,9 @@ namespace //anonymous class json_fmt_visitor : public const_nbt_visitor { public: - json_fmt_visitor(std::ostream& os): os(os) {} + json_fmt_visitor(std::ostream& os, const json_formatter& fmt): + os(os) + {} void visit(const tag_byte& b) override { os << static_cast(b.get()) << "b"; } //We don't want to print a character @@ -185,7 +187,7 @@ namespace //anonymous void json_formatter::write(std::ostream& os, const tag& t) const { - json_fmt_visitor v(os); + json_fmt_visitor v(os, *this); t.accept(v); } -- cgit 0.0.5-2-1-g0f52