Fix -Wloop-analysis warnings in pdf/.
These indicate when a range-based for loop is using an index whose type (value, pointer, or reference) doesn't match what the loop actually extracts from the range. Fix by matching the actual type better. This shouldn't cause any behavior/performance change, just be slightly clearer about what's actually happening when reading the code. Bug: 1223264 Change-Id: Ib95f240cc46dc949e6c2501de8f29ee02321878e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2984973 Auto-Submit: Peter Kasting <pkasting@chromium.org> Commit-Queue: Daniel Hosseinian <dhoss@chromium.org> Reviewed-by: Daniel Hosseinian <dhoss@chromium.org> Cr-Commit-Position: refs/heads/master@{#896117}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
91fb9e97f6
commit
21e103c772
@ -36,7 +36,7 @@ pp::Var VarFromValue(const base::Value& value) {
|
||||
}
|
||||
case base::Value::Type::DICTIONARY: {
|
||||
pp::VarDictionary var_dict;
|
||||
for (const auto& value_pair : value.DictItems()) {
|
||||
for (auto value_pair : value.DictItems()) {
|
||||
var_dict.Set(value_pair.first, VarFromValue(value_pair.second));
|
||||
}
|
||||
return var_dict;
|
||||
|
Reference in New Issue
Block a user