diff options
author | 2016-03-01 06:45:41 +1100 | |
---|---|---|
committer | 2016-03-01 06:52:36 +1100 | |
commit | a830ea76270b7894a03922a172d58bfaefbc827f (patch) | |
tree | 01d929c08c8fa3e66285a3130004d4aa5d31e393 /src/lib/util/options.cpp | |
parent | b2fc583ed75b19321849fcd4fec518e2b719294b (diff) |
* 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
Diffstat (limited to 'src/lib/util/options.cpp')
-rw-r--r-- | src/lib/util/options.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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(); } |