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

Unified Diff: tools/gn/args.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 | « no previous file | tools/gn/builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/args.cc
diff --git a/tools/gn/args.cc b/tools/gn/args.cc
index a59371a73852649dde02065275b85c6da98875a7..c7c8a0939ca605ec632f6074874a507f3a6b92a1 100644
--- a/tools/gn/args.cc
+++ b/tools/gn/args.cc
@@ -98,7 +98,7 @@ const Value* Args::GetArgOverride(const char* name) const {
Scope::KeyValueMap::const_iterator found =
all_overrides_.find(base::StringPiece(name));
if (found == all_overrides_.end())
- return NULL;
+ return nullptr;
return &found->second;
}
@@ -209,7 +209,7 @@ void Args::SetSystemVarsLocked(Scope* dest) const {
lock_.AssertAcquired();
// Host OS.
- const char* os = NULL;
+ const char* os = nullptr;
#if defined(OS_WIN)
os = "win";
#elif defined(OS_MACOSX)
@@ -221,15 +221,15 @@ void Args::SetSystemVarsLocked(Scope* dest) const {
#else
#error Unknown OS type.
#endif
- Value os_val(NULL, std::string(os));
- dest->SetValue(variables::kBuildOs, os_val, NULL);
- dest->SetValue(variables::kOs, os_val, NULL);
+ Value os_val(nullptr, std::string(os));
+ dest->SetValue(variables::kBuildOs, os_val, nullptr);
+ dest->SetValue(variables::kOs, os_val, nullptr);
// Host architecture.
static const char kX86[] = "x86";
static const char kX64[] = "x64";
static const char kArm[] = "arm";
- const char* arch = NULL;
+ const char* arch = nullptr;
// Set the CPU architecture based on the underlying OS, not
// whatever the current bit-tedness of the GN binary is.
@@ -243,9 +243,9 @@ void Args::SetSystemVarsLocked(Scope* dest) const {
else
CHECK(false) << "OS architecture not handled.";
- Value arch_val(NULL, std::string(arch));
- dest->SetValue(variables::kBuildCpuArch, arch_val, NULL);
- dest->SetValue(variables::kCpuArch, arch_val, NULL);
+ Value arch_val(nullptr, std::string(arch));
+ dest->SetValue(variables::kBuildCpuArch, arch_val, nullptr);
+ dest->SetValue(variables::kCpuArch, arch_val, nullptr);
// Save the OS and architecture as build arguments that are implicitly
// declared. This is so they can be overridden in a toolchain build args
« no previous file with comments | « no previous file | tools/gn/builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698