Use 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. Review URL: https://codereview.chromium.org/853533002 Cr-Commit-Position: refs/heads/master@{#311524}
Showing
Please register or sign in to comment