C++11: range-based for loops: Don't get the container separately.
Don't use an intermediate variable to get the container. Range-based for loops only evaluate the second part once so this is fine. This simplifies code by not making us think about whether the variable is used later in the method. This is only useful with containers that don't need to be const-iterated. We can const_cast<> the container, but that is lengthy and involves mentining the type.
Showing with 114 additions and 200 deletions