Index: tools/gn/scope.cc |
diff --git a/tools/gn/scope.cc b/tools/gn/scope.cc |
index 2bf9dd467da7903b5ff4a874915d5f1481429fea..ee2b1fe4d2bda1e3dedc5fda63f1e9d630d7e2c4 100644 |
--- a/tools/gn/scope.cc |
+++ b/tools/gn/scope.cc |
@@ -25,6 +25,13 @@ bool IsPrivateVar(const base::StringPiece& name) { |
} // namespace |
+// Defaults to all false, which are the things least likely to cause errors. |
+Scope::MergeOptions::MergeOptions() |
+ : clobber_existing(false), |
+ skip_private_vars(false), |
+ mark_dest_used(false) {} |
brettw
2016/01/25 20:44:41
Can you put the } on the following line like the o
sdefresne
2016/01/26 11:59:44
Done here an below.
|
+ |
+Scope::MergeOptions::~MergeOptions() {} |
Scope::ProgrammaticProvider::~ProgrammaticProvider() { |
scope_->RemoveProvider(this); |
@@ -251,6 +258,11 @@ bool Scope::NonRecursiveMergeTo(Scope* dest, |
for (const auto& pair : values_) { |
if (options.skip_private_vars && IsPrivateVar(pair.first)) |
continue; // Skip this private var. |
+ if (!options.excluded_values.empty() && |
brettw
2016/01/25 20:44:41
This loop is getting a bit out of control with pai
sdefresne
2016/01/26 11:59:44
Done.
|
+ options.excluded_values.find(pair.first.as_string()) != |
+ options.excluded_values.end()) { |
+ continue; // Skip this excluded value. |
+ } |
const Value& new_value = pair.second.value; |
if (!options.clobber_existing) { |