Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Unified Diff: src/flags.cc

Issue 618643002: Replace OStream with std::ostream. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/disassembler.cc ('k') | src/frames.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/flags.cc
diff --git a/src/flags.cc b/src/flags.cc
index 98f21ef2c4c9e9ba4c7cf1adcec58593ef234709..e53c45e69d3a35e904f6853035cf6f7c24826f12 100644
--- a/src/flags.cc
+++ b/src/flags.cc
@@ -2,8 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include <ctype.h>
-#include <stdlib.h>
+#include <cctype>
+#include <cstdlib>
+#include <sstream>
#include "src/v8.h"
@@ -181,7 +182,7 @@ static const char* Type2String(Flag::FlagType type) {
}
-OStream& operator<<(OStream& os, const Flag& flag) { // NOLINT
+std::ostream& operator<<(std::ostream& os, const Flag& flag) { // NOLINT
switch (flag.type()) {
case Flag::TYPE_BOOL:
os << (*flag.bool_variable() ? "true" : "false");
@@ -231,21 +232,21 @@ List<const char*>* FlagList::argv() {
}
{
bool disabled = f->type() == Flag::TYPE_BOOL && !*f->bool_variable();
- OStringStream os;
+ std::ostringstream os;
os << (disabled ? "--no" : "--") << f->name();
- args->Add(StrDup(os.c_str()));
+ args->Add(StrDup(os.str().c_str()));
}
if (f->type() != Flag::TYPE_BOOL) {
- OStringStream os;
+ std::ostringstream os;
os << *f;
- args->Add(StrDup(os.c_str()));
+ args->Add(StrDup(os.str().c_str()));
}
}
}
if (args_flag != NULL) {
- OStringStream os;
+ std::ostringstream os;
os << "--" << args_flag->name();
- args->Add(StrDup(os.c_str()));
+ args->Add(StrDup(os.str().c_str()));
JSArguments jsargs = *args_flag->args_variable();
for (int j = 0; j < jsargs.argc; j++) {
args->Add(StrDup(jsargs[j]));
« no previous file with comments | « src/disassembler.cc ('k') | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698