Use const reference in for loop (clang-tidy)

Authored by nienhueser on Sun, Mar 19, 12:24 AM.