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

Unified Diff: tools/gn/commands.cc

Issue 798333005: tools/gn: Pass clang-modernize -use-nullptr over it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address Brett's review - revert some clang-format changes Created 6 years 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 | « tools/gn/command_refs.cc ('k') | tools/gn/escape.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/commands.cc
diff --git a/tools/gn/commands.cc b/tools/gn/commands.cc
index 9e64e41383840fc36231909c3b8b4e56863a0003..f72ab61b9c4e195c0e4c34307e6f184d9babc4cb 100644
--- a/tools/gn/commands.cc
+++ b/tools/gn/commands.cc
@@ -14,9 +14,9 @@
namespace commands {
CommandInfo::CommandInfo()
- : help_short(NULL),
- help(NULL),
- runner(NULL) {
+ : help_short(nullptr),
+ help(nullptr),
+ runner(nullptr) {
}
CommandInfo::CommandInfo(const char* in_help_short,
@@ -54,21 +54,21 @@ const Target* ResolveTargetFromCommandLineString(
const std::string& label_string) {
// Need to resolve the label after we know the default toolchain.
Label default_toolchain = setup->loader()->default_toolchain_label();
- Value arg_value(NULL, label_string);
+ Value arg_value(nullptr, label_string);
Err err;
Label label = Label::Resolve(SourceDirForCurrentDirectory(
setup->build_settings().root_path()),
default_toolchain, arg_value, &err);
if (err.has_error()) {
err.PrintToStdout();
- return NULL;
+ return nullptr;
}
const Item* item = setup->builder()->GetItem(label);
if (!item) {
Err(Location(), "Label not found.",
label.GetUserVisibleName(false) + " not found.").PrintToStdout();
- return NULL;
+ return nullptr;
}
const Target* target = item->AsTarget();
@@ -77,7 +77,7 @@ const Target* ResolveTargetFromCommandLineString(
"The \"" + label.GetUserVisibleName(false) + "\" thing\n"
"is not a target. Somebody should probably implement this command for "
"other\nitem types.");
- return NULL;
+ return nullptr;
}
return target;
@@ -88,7 +88,7 @@ bool ResolveTargetsFromCommandLinePattern(
const std::string& label_pattern,
bool all_toolchains,
std::vector<const Target*>* matches) {
- Value pattern_value(NULL, label_pattern);
+ Value pattern_value(nullptr, label_pattern);
Err err;
LabelPattern pattern = LabelPattern::GetPattern(
« no previous file with comments | « tools/gn/command_refs.cc ('k') | tools/gn/escape.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698