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

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

Issue 654263004: Simplify ScopedVector<scoped_ptr<T>> to ScopedVector<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« tools/gn/loader.cc ('K') | « tools/gn/scope.h ('k') | no next file » | 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 "tools/gn/target_generator.h" 5 #include "tools/gn/target_generator.h"
6 6
7 #include "tools/gn/action_target_generator.h" 7 #include "tools/gn/action_target_generator.h"
8 #include "tools/gn/binary_target_generator.h" 8 #include "tools/gn/binary_target_generator.h"
9 #include "tools/gn/build_settings.h" 9 #include "tools/gn/build_settings.h"
10 #include "tools/gn/config.h" 10 #include "tools/gn/config.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 if (err->has_error()) 120 if (err->has_error())
121 return; 121 return;
122 122
123 // Save this target for the file. 123 // Save this target for the file.
124 Scope::ItemVector* collector = scope->GetItemCollector(); 124 Scope::ItemVector* collector = scope->GetItemCollector();
125 if (!collector) { 125 if (!collector) {
126 *err = Err(function_call, "Can't define a target in this context."); 126 *err = Err(function_call, "Can't define a target in this context.");
127 return; 127 return;
128 } 128 }
129 collector->push_back(new scoped_ptr<Item>(target.PassAs<Item>())); 129 collector->push_back(target.release());
130 } 130 }
131 131
132 const BuildSettings* TargetGenerator::GetBuildSettings() const { 132 const BuildSettings* TargetGenerator::GetBuildSettings() const {
133 return scope_->settings()->build_settings(); 133 return scope_->settings()->build_settings();
134 } 134 }
135 135
136 bool TargetGenerator::FillSources() { 136 bool TargetGenerator::FillSources() {
137 const Value* value = scope_->GetValue(variables::kSources, true); 137 const Value* value = scope_->GetValue(variables::kSources, true);
138 if (!value) 138 if (!value)
139 return true; 139 return true;
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 bool TargetGenerator::FillForwardDependentConfigs() { 337 bool TargetGenerator::FillForwardDependentConfigs() {
338 const Value* value = scope_->GetValue( 338 const Value* value = scope_->GetValue(
339 variables::kForwardDependentConfigsFrom, true); 339 variables::kForwardDependentConfigsFrom, true);
340 if (value) { 340 if (value) {
341 ExtractListOfUniqueLabels(*value, scope_->GetSourceDir(), 341 ExtractListOfUniqueLabels(*value, scope_->GetSourceDir(),
342 ToolchainLabelForScope(scope_), 342 ToolchainLabelForScope(scope_),
343 &target_->forward_dependent_configs(), err_); 343 &target_->forward_dependent_configs(), err_);
344 } 344 }
345 return !err_->has_error(); 345 return !err_->has_error();
346 } 346 }
OLDNEW
« tools/gn/loader.cc ('K') | « tools/gn/scope.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698