Remove range-based-for-loop for MSVC compatibility