Skip to content

Commit

Permalink
Fix -Wloop-analysis warnings in pdf/.
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
pkasting authored and Chromium LUCI CQ committed Jun 25, 2021
1 parent 91fb9e9 commit 21e103c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pdf/ppapi_migration/value_conversions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 21e103c

Please sign in to comment.