ASE: Fix warning unreachable code
parent
83d4ab8563
commit
06fffb4f83
|
@ -112,6 +112,7 @@ using namespace Assimp::ASE;
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
Parser::Parser(const char *szFile, unsigned int fileFormatDefault) {
|
Parser::Parser(const char *szFile, unsigned int fileFormatDefault) {
|
||||||
ai_assert(nullptr != szFile);
|
ai_assert(nullptr != szFile);
|
||||||
|
|
||||||
filePtr = szFile;
|
filePtr = szFile;
|
||||||
iFileFormat = fileFormatDefault;
|
iFileFormat = fileFormatDefault;
|
||||||
|
|
||||||
|
@ -486,7 +487,7 @@ void Parser::ParseLV1MaterialListBlock() {
|
||||||
ParseLV4MeshLong(iIndex);
|
ParseLV4MeshLong(iIndex);
|
||||||
|
|
||||||
if (iIndex >= iMaterialCount) {
|
if (iIndex >= iMaterialCount) {
|
||||||
LogError("Out of range: material index is too large");
|
LogWarning("Out of range: material index is too large");
|
||||||
iIndex = iMaterialCount - 1;
|
iIndex = iMaterialCount - 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -905,7 +906,6 @@ void Parser::ParseLV2LightSettingsBlock(ASE::Light &light) {
|
||||||
}
|
}
|
||||||
AI_ASE_HANDLE_SECTION("2", "LIGHT_SETTINGS");
|
AI_ASE_HANDLE_SECTION("2", "LIGHT_SETTINGS");
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
@ -1782,7 +1782,9 @@ void Parser::ParseLV4MeshFace(ASE::Face &out) {
|
||||||
|
|
||||||
// *MESH_MTLID is optional, too
|
// *MESH_MTLID is optional, too
|
||||||
while (true) {
|
while (true) {
|
||||||
if ('*' == *filePtr) break;
|
if ('*' == *filePtr) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (IsLineEnd(*filePtr)) {
|
if (IsLineEnd(*filePtr)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1831,8 +1833,9 @@ void Parser::ParseLV4MeshFloatTriple(ai_real *apOut, unsigned int &rIndexOut) {
|
||||||
void Parser::ParseLV4MeshFloatTriple(ai_real *apOut) {
|
void Parser::ParseLV4MeshFloatTriple(ai_real *apOut) {
|
||||||
ai_assert(nullptr != apOut);
|
ai_assert(nullptr != apOut);
|
||||||
|
|
||||||
for (unsigned int i = 0; i < 3; ++i)
|
for (unsigned int i = 0; i < 3; ++i) {
|
||||||
ParseLV4MeshFloat(apOut[i]);
|
ParseLV4MeshFloat(apOut[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void Parser::ParseLV4MeshFloat(ai_real &fOut) {
|
void Parser::ParseLV4MeshFloat(ai_real &fOut) {
|
||||||
|
|
Loading…
Reference in New Issue