diff options
| author | ljfa-ag <ljfa-ag@web.de> | 2015-08-11 11:26:22 +0200 |
|---|---|---|
| committer | ljfa-ag <ljfa-ag@web.de> | 2015-08-11 11:26:22 +0200 |
| commit | 9c2cea3e85872e1e5005b51b16fa1e6876bf1011 (patch) | |
| tree | f8e3dc74b6ec06f015d061b80797d9145a2c227f /src/text/json_formatter.cpp | |
| parent | b5f3570924b49eb8564b68b02e5dbd18f0ad9a06 (diff) | |
| download | Project-Tick-9c2cea3e85872e1e5005b51b16fa1e6876bf1011.tar.gz Project-Tick-9c2cea3e85872e1e5005b51b16fa1e6876bf1011.zip | |
Add json_formatter argument to json_fmt_visitor
which will be useful later when it becomes configurable
Diffstat (limited to 'src/text/json_formatter.cpp')
| -rw-r--r-- | src/text/json_formatter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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<int>(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); } |
