Commit 206c846e authored by Victor Zverovich's avatar Victor Zverovich

Replace BasicFormatter.Add with args_.push_back.

parent 2d620be6
...@@ -953,10 +953,6 @@ class BasicFormatter { ...@@ -953,10 +953,6 @@ class BasicFormatter {
BasicFormatter(const BasicFormatter &); BasicFormatter(const BasicFormatter &);
BasicFormatter& operator=(const BasicFormatter &); BasicFormatter& operator=(const BasicFormatter &);
void Add(const Arg &arg) {
args_.push_back(&arg);
}
void ReportError(const Char *s, StringRef message) const; void ReportError(const Char *s, StringRef message) const;
unsigned ParseUInt(const Char *&s) const; unsigned ParseUInt(const Char *&s) const;
...@@ -1001,7 +997,7 @@ class BasicFormatter { ...@@ -1001,7 +997,7 @@ class BasicFormatter {
: writer_(&w), format_(format) { : writer_(&w), format_(format) {
args_.reserve(args.size()); args_.reserve(args.size());
for (const Arg &arg: args) for (const Arg &arg: args)
Add(arg); args_.push_back(&arg);
} }
// Perfoms formatting if the format string is non-null. The format string // Perfoms formatting if the format string is non-null. The format string
...@@ -1017,7 +1013,7 @@ class BasicFormatter { ...@@ -1017,7 +1013,7 @@ class BasicFormatter {
// Feeds an argument to a formatter. // Feeds an argument to a formatter.
BasicFormatter &operator<<(const Arg &arg) { BasicFormatter &operator<<(const Arg &arg) {
arg.formatter = this; arg.formatter = this;
Add(arg); args_.push_back(&arg);
return *this; return *this;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment