diff --git a/src/MeshTools/Duplicate.h b/src/MeshTools/Duplicate.h index f35549990..e86baeed9 100644 --- a/src/MeshTools/Duplicate.h +++ b/src/MeshTools/Duplicate.h @@ -44,8 +44,8 @@ index array `{1, 1, 0, 3, 2, 2}` will be converted to `{b, b, a, d, c, c}`. template std::vector duplicate(const std::vector& indices, const std::vector& vertices) { std::vector out; out.reserve(indices.size()); - for(const UnsignedInt index: indices) - out.push_back(vertices[index]); + for(auto it = indices.begin(); it != indices.end(); ++it) + out.push_back(vertices[*it]); return std::move(out); } diff --git a/src/MeshTools/RemoveDuplicates.h b/src/MeshTools/RemoveDuplicates.h index 10cb132c7..c7f5e0e5e 100644 --- a/src/MeshTools/RemoveDuplicates.h +++ b/src/MeshTools/RemoveDuplicates.h @@ -95,9 +95,9 @@ template void RemoveDuplicates shadingLanguageVersions = c->shadingLanguageVersionStrings(); - for(const auto& version: shadingLanguageVersions) - Debug() << " " << version; + for(auto it = shadingLanguageVersions.begin(); it != shadingLanguageVersions.end(); ++it) + Debug() << " " << *it; Debug() << "";