DescriptionUse proper pair type in range-based for map iterations.
Since map<Key, Value>::value_type is std::pair<const Key, Value>, we
need to ensure that we use this type to avoid an extra copy/temporary
creation. This patch does this by explicitly using value_type where
it is clear what the type is, and adding const to the key where it's not.
Committed: https://crrev.com/49418e62a7ea52dfa99b3316b0e7b5cf79f98844
Cr-Commit-Position: refs/heads/master@{#311524}
Patch Set 1 #
Total comments: 2
Patch Set 2 : supervised_user auto #
Total comments: 2
Patch Set 3 : more auto #
Messages
Total messages: 18 (5 generated)
|