Don't use range-based for loops

VS2010 doesn't support them :-(