Browse Source

GCC 4.4 compatibility: explicit std::reference_wrapper constructor.

Vladimír Vondruš 12 years ago
parent
commit
518ea9dfb2
  1. 6
      src/MagnumPlugins/ObjImporter/ObjImporter.cpp

6
src/MagnumPlugins/ObjImporter/ObjImporter.cpp

@ -424,9 +424,9 @@ std::optional<MeshData3D> ObjImporter::doMesh3D(UnsignedInt id) {
if(!normalIndices.empty() || !textureCoordinateIndices.empty()) {
std::vector<std::reference_wrapper<std::vector<UnsignedInt>>> arrays;
arrays.reserve(3);
arrays.push_back(positionIndices);
if(!normalIndices.empty()) arrays.push_back(normalIndices);
if(!textureCoordinateIndices.empty()) arrays.push_back(textureCoordinateIndices);
arrays.push_back(std::ref(positionIndices));
if(!normalIndices.empty()) arrays.push_back(std::ref(normalIndices));
if(!textureCoordinateIndices.empty()) arrays.push_back(std::ref(textureCoordinateIndices));
indices = MeshTools::combineIndexArrays(arrays);
/* Reindex data arrays */

Loading…
Cancel
Save