Use range-based-for here now.

Authored by mwolff on Sep 6 2016, 9:13 PM.