From a830ea76270b7894a03922a172d58bfaefbc827f Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Tue, 1 Mar 2016 06:45:41 +1100 Subject: * Support *n conversion in stream_format/string_format * Make stream_format return characters printed * Add iostreams with std::vector storage * Move to type-safe templates for logerror and popmessage * Remove now-unnecessary I64FMT from calls to logerror/popmessage * Put some lib/util stuff in util:: namespace * Some fixes to Japanese translation --- src/lib/util/options.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/lib/util/options.cpp') diff --git a/src/lib/util/options.cpp b/src/lib/util/options.cpp index ccc6024c9f9..56bad147bcb 100644 --- a/src/lib/util/options.cpp +++ b/src/lib/util/options.cpp @@ -519,7 +519,7 @@ std::string core_options::output_ini(const core_options *diff) const { if (num_valid_headers++) buffer << '\n'; - stream_format(buffer, "#\n# %s\n#\n", last_header); + util::stream_format(buffer, "#\n# %s\n#\n", last_header); last_header = nullptr; } @@ -527,9 +527,9 @@ std::string core_options::output_ini(const core_options *diff) const if (!is_unadorned) { if (strchr(value, ' ') != nullptr) - stream_format(buffer, "%-25s \"%s\"\n", name, value); + util::stream_format(buffer, "%-25s \"%s\"\n", name, value); else - stream_format(buffer, "%-25s %s\n", name, value); + util::stream_format(buffer, "%-25s %s\n", name, value); } } } @@ -553,11 +553,11 @@ std::string core_options::output_help() const { // header: just print if (curentry->is_header()) - stream_format(buffer, "\n#\n# %s\n#\n", curentry->description()); + util::stream_format(buffer, "\n#\n# %s\n#\n", curentry->description()); // otherwise, output entries for all non-deprecated items else if (curentry->description() != nullptr) - stream_format(buffer, "-%-20s%s\n", curentry->name(), curentry->description()); + util::stream_format(buffer, "-%-20s%s\n", curentry->name(), curentry->description()); } return buffer.str(); } -- cgit v1.2.3-70-g09d2