mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 06:21:00 +00:00
format_arg -> do_format_arg
This commit is contained in:
parent
55a1ac5035
commit
a1dd524b6f
@ -3446,8 +3446,8 @@ inline format_arg basic_format_context<Char>::parse_arg_id() {
|
|||||||
|
|
||||||
// Formats a single argument.
|
// Formats a single argument.
|
||||||
template <typename ArgFormatter, typename Char, typename Context>
|
template <typename ArgFormatter, typename Char, typename Context>
|
||||||
void format_arg(BasicWriter<Char> &writer, const internal::Arg &arg,
|
void do_format_arg(BasicWriter<Char> &writer, const internal::Arg &arg,
|
||||||
Context &ctx) {
|
Context &ctx) {
|
||||||
using internal::Arg;
|
using internal::Arg;
|
||||||
const Char *&s = ctx.ptr();
|
const Char *&s = ctx.ptr();
|
||||||
FormatSpec spec;
|
FormatSpec spec;
|
||||||
@ -3630,7 +3630,7 @@ void vformat(BasicWriter<Char> &writer, BasicCStringRef<Char> format_str,
|
|||||||
if (c == '}')
|
if (c == '}')
|
||||||
FMT_THROW(format_error("unmatched '}' in format string"));
|
FMT_THROW(format_error("unmatched '}' in format string"));
|
||||||
internal::write(writer, start, s - 1);
|
internal::write(writer, start, s - 1);
|
||||||
format_arg<ArgFormatter>(writer, ctx.parse_arg_id(), ctx);
|
do_format_arg<ArgFormatter>(writer, ctx.parse_arg_id(), ctx);
|
||||||
if (*s != '}')
|
if (*s != '}')
|
||||||
FMT_THROW(format_error(fmt::format("unknown format specifier")));
|
FMT_THROW(format_error(fmt::format("unknown format specifier")));
|
||||||
start = ++s;
|
start = ++s;
|
||||||
|
@ -88,7 +88,7 @@ void format_value(BasicWriter<Char> &w, const T &value,
|
|||||||
internal::MemoryBuffer<Char, internal::INLINE_BUFFER_SIZE> buffer;
|
internal::MemoryBuffer<Char, internal::INLINE_BUFFER_SIZE> buffer;
|
||||||
auto str = internal::format_value(buffer, value);
|
auto str = internal::format_value(buffer, value);
|
||||||
typedef internal::MakeArg< basic_format_context<Char> > MakeArg;
|
typedef internal::MakeArg< basic_format_context<Char> > MakeArg;
|
||||||
format_arg< ArgFormatter<Char> >(w, MakeArg(str), ctx);
|
do_format_arg< ArgFormatter<Char> >(w, MakeArg(str), ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
FMT_API void vprint(std::ostream &os, CStringRef format_str, format_args args);
|
FMT_API void vprint(std::ostream &os, CStringRef format_str, format_args args);
|
||||||
|
Loading…
Reference in New Issue
Block a user