Skip to content

Commit

Permalink
Merge pull request #4355 from assimp/kimkulling_fix_win64_warning_unr…
Browse files Browse the repository at this point in the history
…eachable_code

ASE: Fix warning unreachable code
  • Loading branch information
kimkulling committed Jan 24, 2022
2 parents 83d4ab8 + 06fffb4 commit 5698d41
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions code/AssetLib/ASE/ASEParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ using namespace Assimp::ASE;
// ------------------------------------------------------------------------------------------------
Parser::Parser(const char *szFile, unsigned int fileFormatDefault) {
ai_assert(nullptr != szFile);

filePtr = szFile;
iFileFormat = fileFormatDefault;

Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -905,7 +906,6 @@ void Parser::ParseLV2LightSettingsBlock(ASE::Light &light) {
}
AI_ASE_HANDLE_SECTION("2", "LIGHT_SETTINGS");
}
return;
}

// ------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 5698d41

Please sign in to comment.