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

Unified Diff: tools/gn/template.cc

Issue 1544333002: Convert Pass()→std::move() in //tools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/target_unittest.cc ('k') | tools/gn/test_with_scope.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/template.cc
diff --git a/tools/gn/template.cc b/tools/gn/template.cc
index 3d58b9a7eb010df9c650f80d4815f3fc74ec18ff..012e71692f61e4a132cf09901c31763b0fc145ba 100644
--- a/tools/gn/template.cc
+++ b/tools/gn/template.cc
@@ -4,6 +4,8 @@
#include "tools/gn/template.h"
+#include <utility>
+
#include "tools/gn/err.h"
#include "tools/gn/functions.h"
#include "tools/gn/parse_tree.h"
@@ -17,9 +19,7 @@ Template::Template(const Scope* scope, const FunctionCallNode* def)
}
Template::Template(scoped_ptr<Scope> scope, const FunctionCallNode* def)
- : closure_(scope.Pass()),
- definition_(def) {
-}
+ : closure_(std::move(scope)), definition_(def) {}
Template::~Template() {
}
@@ -81,7 +81,7 @@ Value Template::Invoke(Scope* scope,
template_scope.SetValue(kInvoker, Value(nullptr, scoped_ptr<Scope>()),
invocation);
Value* invoker_value = template_scope.GetMutableValue(kInvoker, false);
- invoker_value->SetScopeValue(invocation_scope.Pass());
+ invoker_value->SetScopeValue(std::move(invocation_scope));
template_scope.set_source_dir(scope->GetSourceDir());
const base::StringPiece target_name("target_name");
« no previous file with comments | « tools/gn/target_unittest.cc ('k') | tools/gn/test_with_scope.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698