From 95a5c4d8a8b7eace40fd21110fa545716b994a4f Mon Sep 17 00:00:00 2001 From: JimmyDaSilva Date: Mon, 22 Feb 2016 13:16:05 +0100 Subject: [PATCH] Use make_pair, fix indentation --- src/model.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/model.cpp b/src/model.cpp index 4c345cf..a766f3c 100644 --- a/src/model.cpp +++ b/src/model.cpp @@ -83,7 +83,7 @@ Model::recursiveTextureLoad(const struct aiScene *sc, const aiNode* nd) TextureAndPath reusedTexture; reusedTexture.hTexture = it->second.hTexture; reusedTexture.pathName = *str; - texturesAndPaths[std::pair(nd, n)] = reusedTexture; + texturesAndPaths[std::make_pair(nd, n)] = reusedTexture; newTextureToBeLoaded = false; std::cout << "Texture reused." << std::endl; @@ -130,7 +130,7 @@ Model::recursiveTextureLoad(const struct aiScene *sc, const aiNode* nd) std::cout << "texture loaded." << std::endl; - texturesAndPaths[std::pair(nd, n)] = newTexture; + texturesAndPaths[std::make_pair(nd, n)] = newTexture; } } } @@ -203,7 +203,7 @@ Model::recursive_render(const struct aiScene *sc, const aiNode* nd) const const struct aiMesh* mesh = sc->mMeshes[nd->mMeshes[n]]; if (n < texturesAndPaths.size()) - glBindTexture(GL_TEXTURE_2D, texturesAndPaths.at(std::pair(nd, n)).hTexture); + glBindTexture(GL_TEXTURE_2D, texturesAndPaths.at(std::make_pair(nd, n)).hTexture); apply_material(sc->mMaterials[mesh->mMaterialIndex]);