Merge pull request #4355 from assimp/kimkulling_fix_win64_warning_unreachable_code

ASE: Fix warning unreachable code
kimkulling-issue4358
Kim Kulling 2022-01-24 20:43:34 +01:00 committed by GitHub
commit 5698d41bf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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,9 +1833,10 @@ 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) {
// skip spaces and tabs