Use auto& instead of auto in the range loop
There are a couple reasons for this change: 1. Avoid copying 2-pointer struct. 2. If any of the pointers 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: Ic2c6c1cc37601a8a22cb0bb2177547ea614fbcea Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2434021 Auto-Submit: Bartek Nowierski <bartekn@chromium.org> Reviewed-by:Mike Wittman <wittman@chromium.org> Commit-Queue: Bartek Nowierski <bartekn@chromium.org> Cr-Commit-Position: refs/heads/master@{#811476}
Showing
Please register or sign in to comment