Use auto& instead of auto in the range loop
There are a couple reasons for this change: 1. Avoid copying a struct larger than a pointer. 2. If the pointer in the struct gets replaced by CheckedPtr with a non-trivial constructor, the compiler will complain. See go/miracleptr for more details on the experimental CheckedPtr project. Bug: 1080832 Change-Id: I520614995dcbae3bdab69a1423d288b2eeea9189 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2437991 Commit-Queue: Bartek Nowierski <bartekn@chromium.org> Commit-Queue: Aaron Leventhal <aleventhal@chromium.org> Auto-Submit: Bartek Nowierski <bartekn@chromium.org> Reviewed-by:Aaron Leventhal <aleventhal@chromium.org> Cr-Commit-Position: refs/heads/master@{#811661}
Showing
Please register or sign in to comment