ASE: Fix warning unreachable code

pull/4355/head
Kim Kulling 2022-01-24 20:05:25 +01:00
parent 83d4ab8563
commit 06fffb4f83
1 changed files with 7 additions and 4 deletions

View File

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