Skip to content

Commit

Permalink
fixed warning enumeration value not handled
Browse files Browse the repository at this point in the history
  • Loading branch information
markusobi committed Jan 9, 2019
1 parent d12baa7 commit 4560691
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/content/AnimationLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,9 @@ namespace Animations
ModelAnimationParser p(zen);
p.setScale(1.0f / 100.0f);

ModelAnimationParser::EChunkType type;
while ((type = p.parse()) != ModelAnimationParser::CHUNK_EOF)
while (true)
{
switch (type)
switch (p.parse())
{
case ModelAnimationParser::CHUNK_HEADER:
data.m_Header = p.getHeader();
Expand All @@ -134,10 +133,11 @@ namespace Animations
break;
case ModelAnimationParser::CHUNK_ERROR:
return Handle::AnimationDataHandle::makeInvalidHandle();
case ModelAnimationParser::CHUNK_EOF:
return h;
}
}

return h;
return Handle::AnimationDataHandle::makeInvalidHandle();
}

/*
Expand Down Expand Up @@ -344,6 +344,8 @@ namespace Animations
break;
case ModelScriptParser::CHUNK_ERROR:
return false;
default:
break;
}
}

Expand Down

0 comments on commit 4560691

Please sign in to comment.