From 206c846e1246cb10d42414296dbdc9e144e0d73d Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 7 Dec 2013 08:03:23 -0800 Subject: [PATCH] Replace BasicFormatter.Add with args_.push_back. --- format.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/format.h b/format.h index 19ca1e9f..a36284ca 100644 --- a/format.h +++ b/format.h @@ -953,10 +953,6 @@ class BasicFormatter { BasicFormatter(const BasicFormatter &); BasicFormatter& operator=(const BasicFormatter &); - void Add(const Arg &arg) { - args_.push_back(&arg); - } - void ReportError(const Char *s, StringRef message) const; unsigned ParseUInt(const Char *&s) const; @@ -1001,7 +997,7 @@ class BasicFormatter { : writer_(&w), format_(format) { args_.reserve(args.size()); for (const Arg &arg: args) - Add(arg); + args_.push_back(&arg); } // Perfoms formatting if the format string is non-null. The format string @@ -1017,7 +1013,7 @@ class BasicFormatter { // Feeds an argument to a formatter. BasicFormatter &operator<<(const Arg &arg) { arg.formatter = this; - Add(arg); + args_.push_back(&arg); return *this; }