(refactoring) Use range-based for as possible.