From 9144a8fbbe8ad5a761fccee06b6399a642c73481 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Wed, 16 Jul 2014 07:59:45 -0700 Subject: [PATCH] PrintfParser -> PrintfFormatter. --- format.cc | 12 ++++++------ format.h | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/format.cc b/format.cc index 9e479fc4..11233006 100644 --- a/format.cc +++ b/format.cc @@ -707,7 +707,7 @@ void fmt::BasicFormatter::CheckSign( } template -void fmt::internal::PrintfParser::ParseFlags( +void fmt::internal::PrintfFormatter::ParseFlags( FormatSpec &spec, const Char *&s) { for (;;) { switch (*s++) { @@ -734,7 +734,7 @@ void fmt::internal::PrintfParser::ParseFlags( } template -unsigned fmt::internal::PrintfParser::ParseHeader( +unsigned fmt::internal::PrintfFormatter::ParseHeader( const Char *&s, FormatSpec &spec, const char *&error) { unsigned arg_index = UINT_MAX; Char c = *s; @@ -769,7 +769,7 @@ unsigned fmt::internal::PrintfParser::ParseHeader( // TODO: move to a base class that doesn't depend on template argument template -const Arg &fmt::internal::PrintfParser::HandleArgIndex( +const Arg &fmt::internal::PrintfFormatter::HandleArgIndex( unsigned arg_index, const char *&error) { if (arg_index != UINT_MAX) { if (next_arg_index_ <= 0) { @@ -791,7 +791,7 @@ const Arg &fmt::internal::PrintfParser::HandleArgIndex( } template -void fmt::internal::PrintfParser::Format( +void fmt::internal::PrintfFormatter::Format( BasicWriter &writer, BasicStringRef format, const ArgList &args) { const Char *start = format.c_str(); @@ -1166,7 +1166,7 @@ template fmt::BasicWriter::CharPtr template void fmt::BasicFormatter::Format( BasicStringRef format, const ArgList &args); -template void fmt::internal::PrintfParser::Format( +template void fmt::internal::PrintfFormatter::Format( BasicWriter &writer, BasicStringRef format, const ArgList &args); // Explicit instantiations for wchar_t. @@ -1178,7 +1178,7 @@ template fmt::BasicWriter::CharPtr template void fmt::BasicFormatter::Format( BasicStringRef format, const ArgList &args); -template void fmt::internal::PrintfParser::Format( +template void fmt::internal::PrintfFormatter::Format( BasicWriter &writer, BasicStringRef format, const ArgList &args); diff --git a/format.h b/format.h index d10c2a3c..66f6a32a 100644 --- a/format.h +++ b/format.h @@ -871,9 +871,9 @@ public: }; namespace internal { -// Printf format string parser. +// A printf formatter. template -class PrintfParser { +class PrintfFormatter { private: ArgList args_; int next_arg_index_; @@ -1351,7 +1351,7 @@ class BasicWriter { friend class internal::ArgFormatter; friend class BasicFormatter; - friend class internal::PrintfParser; + friend class internal::PrintfFormatter; public: /** @@ -1800,7 +1800,7 @@ void print(std::ostream &os, StringRef format, const ArgList &args); template void printf(BasicWriter &w, BasicStringRef format, const ArgList &args) { - internal::PrintfParser().Format(w, format, args); + internal::PrintfFormatter().Format(w, format, args); } inline std::string sprintf(StringRef format, const ArgList &args) {