changed few loops for C++11 range-based for loop
Merge pull request #9194 from dptd/cpp11

changed few loops for C++11 range-based for loop