Use C++11 ranged based for.

Authored by stikonas on Jun 12 2017, 11:53 AM.