Change range-based for-loops to be -Wrange-loop-analysis clean.