Browse Source

GCC 4.5 compatibility: no range-based for.

Vladimír Vondruš 13 years ago
parent
commit
6a91e8f14f
  1. 4
      src/MeshTools/Duplicate.h
  2. 6
      src/MeshTools/RemoveDuplicates.h
  3. 4
      src/Platform/magnum-info.cpp

4
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<class T> std::vector<T> duplicate(const std::vector<UnsignedInt>& indices, const std::vector<T>& vertices) {
std::vector<T> 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);
}

6
src/MeshTools/RemoveDuplicates.h

@ -95,9 +95,9 @@ template<class Vertex, std::size_t vertexSize> void RemoveDuplicates<Vertex, ver
/* Get mesh bounds */
Vertex min = vertices[0], max = vertices[0];
for(const auto& v: vertices) {
min = Math::min(v, min);
max = Math::max(v, max);
for(auto it = vertices.begin(); it != vertices.end(); ++it) {
min = Math::min(*it, min);
max = Math::max(*it, max);
}
/* Make epsilon so large that std::size_t can index all vertices inside

4
src/Platform/magnum-info.cpp

@ -92,8 +92,8 @@ MagnumInfo::MagnumInfo(const Arguments& arguments): WindowlessGlxApplication(arg
Debug() << "Supported GLSL versions:";
const std::vector<std::string> shadingLanguageVersions = c->shadingLanguageVersionStrings();
for(const auto& version: shadingLanguageVersions)
Debug() << " " << version;
for(auto it = shadingLanguageVersions.begin(); it != shadingLanguageVersions.end(); ++it)
Debug() << " " << *it;
Debug() << "";

Loading…
Cancel
Save