Silence more uninitialized variable warnings

These are false positives since aiMaterial::Get will have written to output
if it returns AI_SUCCESS but the compiler can't see that.
pull/464/head
Turo Lamminen 2015-02-13 12:37:40 +02:00
parent f708d0b122
commit 570d02ff6e
2 changed files with 2 additions and 2 deletions

View File

@ -294,7 +294,7 @@ void Discreet3DSExporter::WriteMaterials()
WriteColor(color); WriteColor(color);
} }
aiShadingMode shading_mode; aiShadingMode shading_mode = aiShadingMode_Flat;
if (mat.Get(AI_MATKEY_SHADING_MODEL, shading_mode) == AI_SUCCESS) { if (mat.Get(AI_MATKEY_SHADING_MODEL, shading_mode) == AI_SUCCESS) {
ChunkWriter chunk(writer, Discreet3DS::CHUNK_MAT_SHADING); ChunkWriter chunk(writer, Discreet3DS::CHUNK_MAT_SHADING);

View File

@ -452,7 +452,7 @@ void ColladaExporter::WriteMaterials()
} }
} }
aiShadingMode shading; aiShadingMode shading = aiShadingMode_Flat;
materials[a].shading_model = "phong"; materials[a].shading_model = "phong";
if(mat->Get( AI_MATKEY_SHADING_MODEL, shading) == aiReturn_SUCCESS) { if(mat->Get( AI_MATKEY_SHADING_MODEL, shading) == aiReturn_SUCCESS) {
if(shading == aiShadingMode_Phong) { if(shading == aiShadingMode_Phong) {