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

Unified Diff: tools/gn/scope_per_file_provider.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/scope.cc ('k') | tools/gn/scope_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/scope_per_file_provider.cc
diff --git a/tools/gn/scope_per_file_provider.cc b/tools/gn/scope_per_file_provider.cc
index 64b9a83edc27b9a861e02ae49ee76a66935867ac..d2dea11e6457e6eb89a7625b80cce1a2cb7c2441 100644
--- a/tools/gn/scope_per_file_provider.cc
+++ b/tools/gn/scope_per_file_provider.cc
@@ -41,12 +41,13 @@ const Value* ScopePerFileProvider::GetProgrammaticValue(
if (ident == variables::kTargetOutDir)
return GetTargetOutDir();
}
- return NULL;
+ return nullptr;
}
const Value* ScopePerFileProvider::GetCurrentToolchain() {
if (!current_toolchain_) {
- current_toolchain_.reset(new Value(NULL,
+ current_toolchain_.reset(new Value(
+ nullptr,
scope_->settings()->toolchain_label().GetUserVisibleName(false)));
}
return current_toolchain_.get();
@@ -54,7 +55,8 @@ const Value* ScopePerFileProvider::GetCurrentToolchain() {
const Value* ScopePerFileProvider::GetDefaultToolchain() {
if (!default_toolchain_) {
- default_toolchain_.reset(new Value(NULL,
+ default_toolchain_.reset(new Value(
+ nullptr,
scope_->settings()->default_toolchain_label().GetUserVisibleName(
false)));
}
@@ -63,7 +65,8 @@ const Value* ScopePerFileProvider::GetDefaultToolchain() {
const Value* ScopePerFileProvider::GetPythonPath() {
if (!python_path_) {
- python_path_.reset(new Value(NULL,
+ python_path_.reset(new Value(
+ nullptr,
FilePathToUTF8(scope_->settings()->build_settings()->python_path())));
}
return python_path_.get();
@@ -71,15 +74,17 @@ const Value* ScopePerFileProvider::GetPythonPath() {
const Value* ScopePerFileProvider::GetRootBuildDir() {
if (!root_build_dir_) {
- root_build_dir_.reset(new Value(NULL, DirectoryWithNoLastSlash(
- scope_->settings()->build_settings()->build_dir())));
+ root_build_dir_.reset(new Value(
+ nullptr, DirectoryWithNoLastSlash(
+ scope_->settings()->build_settings()->build_dir())));
}
return root_build_dir_.get();
}
const Value* ScopePerFileProvider::GetRootGenDir() {
if (!root_gen_dir_) {
- root_gen_dir_.reset(new Value(NULL,
+ root_gen_dir_.reset(new Value(
+ nullptr,
DirectoryWithNoLastSlash(GetToolchainGenDir(scope_->settings()))));
}
return root_gen_dir_.get();
@@ -87,7 +92,8 @@ const Value* ScopePerFileProvider::GetRootGenDir() {
const Value* ScopePerFileProvider::GetRootOutDir() {
if (!root_out_dir_) {
- root_out_dir_.reset(new Value(NULL,
+ root_out_dir_.reset(new Value(
+ nullptr,
DirectoryWithNoLastSlash(GetToolchainOutputDir(scope_->settings()))));
}
return root_out_dir_.get();
@@ -95,16 +101,16 @@ const Value* ScopePerFileProvider::GetRootOutDir() {
const Value* ScopePerFileProvider::GetTargetGenDir() {
if (!target_gen_dir_) {
- target_gen_dir_.reset(new Value(NULL,
- DirectoryWithNoLastSlash(GetCurrentGenDir(scope_))));
+ target_gen_dir_.reset(
+ new Value(nullptr, DirectoryWithNoLastSlash(GetCurrentGenDir(scope_))));
}
return target_gen_dir_.get();
}
const Value* ScopePerFileProvider::GetTargetOutDir() {
if (!target_out_dir_) {
- target_out_dir_.reset(new Value(NULL,
- DirectoryWithNoLastSlash(GetCurrentOutputDir(scope_))));
+ target_out_dir_.reset(new Value(
+ nullptr, DirectoryWithNoLastSlash(GetCurrentOutputDir(scope_))));
}
return target_out_dir_.get();
}
« no previous file with comments | « tools/gn/scope.cc ('k') | tools/gn/scope_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698