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_foreach.cc

Issue 2187523003: Allow creation and modification of scopes in GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 4 years, 4 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/command_help.cc ('k') | tools/gn/function_forward_variables_from.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/function_foreach.cc
diff --git a/tools/gn/function_foreach.cc b/tools/gn/function_foreach.cc
index d8fe87ed8c61be19638b688f137359bbfae5357e..c264e3c1ea83fdb3b6653b7166d261d7e84c2891 100644
--- a/tools/gn/function_foreach.cc
+++ b/tools/gn/function_foreach.cc
@@ -95,7 +95,8 @@ Value RunForEach(Scope* scope,
if (old_loop_value_ptr) {
// Put back old value. Use the copy we made, rather than use the pointer,
// which will probably point to the new value now in the scope.
- scope->SetValue(loop_var, old_loop_value, old_loop_value.origin());
+ scope->SetValue(loop_var, std::move(old_loop_value),
+ old_loop_value.origin());
} else {
// Loop variable was undefined before loop, delete it.
scope->RemoveIdentifier(loop_var);
« no previous file with comments | « tools/gn/command_help.cc ('k') | tools/gn/function_forward_variables_from.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698