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

Unified Diff: tools/gn/functions.cc

Issue 1869503004: Convert //tools to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, change iwyu fixes for converted directories to include <memory> Created 4 years, 8 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 | « tools/gn/function_toolchain.cc ('k') | tools/gn/functions_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/functions.cc
diff --git a/tools/gn/functions.cc b/tools/gn/functions.cc
index fc51cc81ab44e3f303bbebf395233c309edce694..f6d405d0a56440d5f4a3abae6346fe10af0c69f7 100644
--- a/tools/gn/functions.cc
+++ b/tools/gn/functions.cc
@@ -301,7 +301,7 @@ Value RunConfig(const FunctionCallNode* function,
g_scheduler->Log("Defining config", label.GetUserVisibleName(true));
// Create the new config.
- scoped_ptr<Config> config(new Config(scope->settings(), label));
+ std::unique_ptr<Config> config(new Config(scope->settings(), label));
config->set_defined_from(function);
if (!Visibility::FillItemVisibility(config.get(), scope, err))
return Value();
@@ -535,7 +535,7 @@ Value RunGetEnv(Scope* scope,
if (!EnsureSingleStringArg(function, args, err))
return Value();
- scoped_ptr<base::Environment> env(base::Environment::Create());
+ std::unique_ptr<base::Environment> env(base::Environment::Create());
std::string result;
if (!env->GetVar(args[0].string_value().c_str(), &result))
@@ -670,7 +670,7 @@ Value RunSetSourcesAssignmentFilter(Scope* scope,
if (args.size() != 1) {
*err = Err(function, "set_sources_assignment_filter takes one argument.");
} else {
- scoped_ptr<PatternList> f(new PatternList);
+ std::unique_ptr<PatternList> f(new PatternList);
f->SetFromValue(args[0], err);
if (!err->has_error())
scope->set_sources_assignment_filter(std::move(f));
« no previous file with comments | « tools/gn/function_toolchain.cc ('k') | tools/gn/functions_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698