diff --git a/src/terraform_cmd.cpp b/src/terraform_cmd.cpp --- a/src/terraform_cmd.cpp +++ b/src/terraform_cmd.cpp @@ -222,9 +222,7 @@ std::tuplesecond); + MarkTileDirtyByTile(t, 0, new_height->second); } /* change the height */ - for (TileIndexToHeightMap::const_iterator it = ts.tile_to_new_height.begin(); - it != ts.tile_to_new_height.end(); it++) { - TileIndex t = it->first; - int height = it->second; + for (const auto &it : ts.tile_to_new_height) { + TileIndex t = it.first; + int height = it.second; SetTileHeight(t, (uint)height); }