Browse Source

function parameter 'meshid' should be passed by const reference

escherstair 6 years ago
parent
commit
dbb498095d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      code/Collada/ColladaLoader.cpp

+ 1 - 1
code/Collada/ColladaLoader.cpp

@@ -588,7 +588,7 @@ void ColladaLoader::BuildMeshesForNode(const ColladaParser& pParser, const Colla
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Find mesh from either meshes or morph target meshes
 // Find mesh from either meshes or morph target meshes
-aiMesh *ColladaLoader::findMesh(std::string meshid) {
+aiMesh *ColladaLoader::findMesh(const std::string& meshid) {
     for (unsigned int i = 0; i < mMeshes.size(); ++i) {
     for (unsigned int i = 0; i < mMeshes.size(); ++i) {
         if (std::string(mMeshes[i]->mName.data) == meshid) {
         if (std::string(mMeshes[i]->mName.data) == meshid) {
             return mMeshes[i];
             return mMeshes[i];