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

Unified Diff: tools/gn/function_toolchain.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/function_set_default_toolchain.cc ('k') | tools/gn/function_write_file_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/function_toolchain.cc
diff --git a/tools/gn/function_toolchain.cc b/tools/gn/function_toolchain.cc
index 34145f23508e904aa852802374a2de74674d2cc6..544b556acbf5f85e820921c2e340b3744c2a88cc 100644
--- a/tools/gn/function_toolchain.cc
+++ b/tools/gn/function_toolchain.cc
@@ -303,7 +303,7 @@ Value RunToolchain(Scope* scope,
Scope block_scope(scope);
block_scope.SetProperty(&kToolchainPropertyKey, toolchain.get());
block->ExecuteBlockInScope(&block_scope, err);
- block_scope.SetProperty(&kToolchainPropertyKey, NULL);
+ block_scope.SetProperty(&kToolchainPropertyKey, nullptr);
if (err->has_error())
return Value();
@@ -722,7 +722,7 @@ Value RunTool(Scope* scope,
// Find the toolchain definition we're executing inside of. The toolchain
// function will set a property pointing to it that we'll pick up.
Toolchain* toolchain = reinterpret_cast<Toolchain*>(
- scope->GetProperty(&kToolchainPropertyKey, NULL));
+ scope->GetProperty(&kToolchainPropertyKey, nullptr));
if (!toolchain) {
*err = Err(function->function(), "tool() called outside of toolchain().",
"The tool() function can only be used inside a toolchain() "
@@ -748,8 +748,8 @@ Value RunTool(Scope* scope,
// Figure out which validator to use for the substitution pattern for this
// tool type. There are different validators for the "outputs" than for the
// rest of the strings.
- bool (*subst_validator)(SubstitutionType) = NULL;
- bool (*subst_output_validator)(SubstitutionType) = NULL;
+ bool (*subst_validator)(SubstitutionType) = nullptr;
+ bool (*subst_output_validator)(SubstitutionType) = nullptr;
if (IsCompilerTool(tool_type)) {
subst_validator = &IsValidCompilerSubstitution;
subst_output_validator = &IsValidCompilerOutputsSubstitution;
@@ -889,7 +889,7 @@ Value RunToolchainArgs(Scope* scope,
// Find the toolchain definition we're executing inside of. The toolchain
// function will set a property pointing to it that we'll pick up.
Toolchain* toolchain = reinterpret_cast<Toolchain*>(
- scope->GetProperty(&kToolchainPropertyKey, NULL));
+ scope->GetProperty(&kToolchainPropertyKey, nullptr));
if (!toolchain) {
*err = Err(function->function(),
"toolchain_args() called outside of toolchain().",
« no previous file with comments | « tools/gn/function_set_default_toolchain.cc ('k') | tools/gn/function_write_file_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698