grepview: port foreach -> range-based for

Authored by kossebau on Jun 26 2019, 11:36 PM.