From 03f68857e27117dfa7381f81d21d2236a4257763 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 20 Apr 2014 08:46:09 -0700 Subject: [PATCH] Replace BasicFormatter::Format with BasicWriter::FormatInt. --- format.cc | 14 +++++++------- format.h | 7 ------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/format.cc b/format.cc index 08a30d6a..96fc0eb9 100644 --- a/format.cc +++ b/format.cc @@ -594,22 +594,22 @@ void fmt::BasicFormatter::DoFormat() { // Format argument. switch (arg.type) { case INT: - FormatInt(arg.int_value, spec); + writer.FormatInt(arg.int_value, spec); break; case UINT: - FormatInt(arg.uint_value, spec); + writer.FormatInt(arg.uint_value, spec); break; case LONG: - FormatInt(arg.long_value, spec); + writer.FormatInt(arg.long_value, spec); break; case ULONG: - FormatInt(arg.ulong_value, spec); + writer.FormatInt(arg.ulong_value, spec); break; case LONG_LONG: - FormatInt(arg.long_long_value, spec); + writer.FormatInt(arg.long_long_value, spec); break; case ULONG_LONG: - FormatInt(arg.ulong_long_value, spec); + writer.FormatInt(arg.ulong_long_value, spec); break; case DOUBLE: writer.FormatDouble(arg.double_value, spec, precision); @@ -658,7 +658,7 @@ void fmt::BasicFormatter::DoFormat() { internal::ReportUnknownType(spec.type_, "pointer"); spec.flags_= HASH_FLAG; spec.type_ = 'x'; - FormatInt(reinterpret_cast(arg.pointer_value), spec); + writer.FormatInt(reinterpret_cast(arg.pointer_value), spec); break; case CUSTOM: if (spec.type_) diff --git a/format.h b/format.h index 4124981b..f46410fd 100644 --- a/format.h +++ b/format.h @@ -1138,13 +1138,6 @@ class BasicFormatter { // writing the output to writer_. void DoFormat(); - // Formats an integer. - // TODO: remove - template - void FormatInt(T value, const FormatSpec &spec) { - *writer_ << IntFormatSpec(value, spec); - } - struct Proxy { BasicWriter *writer; const Char *format;