-
When possible, use `for (auto&` or `for (auto const&` when iterating using C++-11 style iterators.
-
Also switch to colon-style iteration in some cases. Thanks to Dean Scarff for drawing this to my attention after detecting some unnecessary copies with https://clang.llvm.org/extra/clang-tidy/checks/performance-for-range-copy.html
-
This was added in C++11.
-
Just because we know an indirect reference is null, doesn't mean we shouldn't keep it indirect.