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: I5d0718a351af253bd3917bef87d417f9f0d71b17 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2435033 Auto-Submit: Bartek Nowierski <bartekn@chromium.org> Reviewed-by:Aaron Leventhal <aleventhal@chromium.org> Commit-Queue: Bartek Nowierski <bartekn@chromium.org> Cr-Commit-Position: refs/heads/master@{#811485}
Showing
Please register or sign in to comment