Collada: Silence uninitialized variable warning
authorTuro Lamminen <turotl@gmail.com>
Mon, 18 Sep 2017 11:10:58 +0000 (14:10 +0300)
committerTuro Lamminen <turotl@gmail.com>
Mon, 18 Sep 2017 11:10:58 +0000 (14:10 +0300)
This is a false positive. Value of 'method' is only used if 'targetMeshes'
contains something and all paths through the first loop which add stuff
to 'targetMeshes' also set 'method'.

code/ColladaLoader.cpp

index 0e970b4..ccf79ed 100644 (file)
@@ -674,7 +674,7 @@ aiMesh* ColladaLoader::CreateMesh( const ColladaParser& pParser, const Collada::
     // create morph target meshes if any
     std::vector<aiMesh*> targetMeshes;
     std::vector<float> targetWeights;
-    Collada::MorphMethod method;
+    Collada::MorphMethod method = Collada::Normalized;
 
     for(std::map<std::string, Collada::Controller>::const_iterator it = pParser.mControllerLibrary.begin();
         it != pParser.mControllerLibrary.end(); it++)