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

Side by Side Diff: tools/gn/function_toolchain.cc

Issue 2972113002: Remove ScopedVector from tools/gn/. (Closed)
Patch Set: Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « tools/gn/function_get_target_outputs_unittest.cc ('k') | tools/gn/functions.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <algorithm> 5 #include <algorithm>
6 #include <limits> 6 #include <limits>
7 #include <utility> 7 #include <utility>
8 8
9 #include "tools/gn/err.h" 9 #include "tools/gn/err.h"
10 #include "tools/gn/functions.h" 10 #include "tools/gn/functions.h"
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 if (!block_scope.CheckForUnusedVars(err)) 489 if (!block_scope.CheckForUnusedVars(err))
490 return Value(); 490 return Value();
491 491
492 // Save this toolchain. 492 // Save this toolchain.
493 toolchain->ToolchainSetupComplete(); 493 toolchain->ToolchainSetupComplete();
494 Scope::ItemVector* collector = scope->GetItemCollector(); 494 Scope::ItemVector* collector = scope->GetItemCollector();
495 if (!collector) { 495 if (!collector) {
496 *err = Err(function, "Can't define a toolchain in this context."); 496 *err = Err(function, "Can't define a toolchain in this context.");
497 return Value(); 497 return Value();
498 } 498 }
499 collector->push_back(toolchain.release()); 499 collector->push_back(std::move(toolchain));
500 return Value(); 500 return Value();
501 } 501 }
502 502
503 // tool ------------------------------------------------------------------------ 503 // tool ------------------------------------------------------------------------
504 504
505 const char kTool[] = "tool"; 505 const char kTool[] = "tool";
506 const char kTool_HelpShort[] = 506 const char kTool_HelpShort[] =
507 "tool: Specify arguments to a toolchain tool."; 507 "tool: Specify arguments to a toolchain tool.";
508 const char kTool_Help[] = 508 const char kTool_Help[] =
509 R"(tool: Specify arguments to a toolchain tool. 509 R"(tool: Specify arguments to a toolchain tool.
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 1084
1085 // Make sure there weren't any vars set in this tool that were unused. 1085 // Make sure there weren't any vars set in this tool that were unused.
1086 if (!block_scope.CheckForUnusedVars(err)) 1086 if (!block_scope.CheckForUnusedVars(err))
1087 return Value(); 1087 return Value();
1088 1088
1089 toolchain->SetTool(tool_type, std::move(tool)); 1089 toolchain->SetTool(tool_type, std::move(tool));
1090 return Value(); 1090 return Value();
1091 } 1091 }
1092 1092
1093 } // namespace functions 1093 } // namespace functions
OLDNEW
« no previous file with comments | « tools/gn/function_get_target_outputs_unittest.cc ('k') | tools/gn/functions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698