Reduce symbol sizes and simplify iterator use
This commit is contained in:
@@ -39,10 +39,9 @@ class custom_arg_formatter
|
||||
|
||||
std::string custom_vformat(fmt::string_view format_str, fmt::format_args args) {
|
||||
fmt::memory_buffer buffer;
|
||||
fmt::detail::buffer<char>& base = buffer;
|
||||
// Pass custom argument formatter as a template arg to vwrite.
|
||||
fmt::vformat_to<custom_arg_formatter>(std::back_inserter(base), format_str,
|
||||
args);
|
||||
fmt::vformat_to<custom_arg_formatter>(
|
||||
fmt::detail::buffer_appender<char>(buffer), format_str, args);
|
||||
return std::string(buffer.data(), buffer.size());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user