Get rid of warnings on GCC4.4 with -wall

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@541 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
aramis_acg
2010-02-06 23:52:41 +00:00
parent 7dcbff5d5c
commit 17326515d4
33 changed files with 206 additions and 125 deletions

View File

@@ -132,6 +132,8 @@ void AnimResolver::ClearAnimRangeSetup()
// Insert additional keys to match LWO's pre& post behaviours.
void AnimResolver::UpdateAnimRangeSetup()
{
// XXX doesn't work yet (hangs if more than one envelope channels needs to be interpolated)
for (std::list<LWO::Envelope>::iterator it = envelopes.begin(); it != envelopes.end(); ++it) {
if ((*it).keys.empty()) continue;
@@ -151,7 +153,7 @@ void AnimResolver::UpdateAnimRangeSetup()
case LWO::PrePostBehaviour_OffsetRepeat:
case LWO::PrePostBehaviour_Repeat:
case LWO::PrePostBehaviour_Oscillate:
{
const double start_time = delta - fmod(my_first-first,delta);
std::vector<LWO::Key>::iterator n = std::find_if((*it).keys.begin(),(*it).keys.end(),
std::bind1st(std::greater<double>(),start_time)),m;
@@ -195,6 +197,10 @@ void AnimResolver::UpdateAnimRangeSetup()
}
}
break;
}
default:
// silence compiler warning
break;
}
// process post behaviour
@@ -205,6 +211,10 @@ void AnimResolver::UpdateAnimRangeSetup()
case LWO::PrePostBehaviour_Oscillate:
break;
default:
// silence compiler warning
break;
}
}
}
@@ -307,7 +317,10 @@ void AnimResolver::DoInterpolation2(std::vector<LWO::Key>::const_iterator beg,
// no interpolation at all - take the value of the last key
fill = (*beg).value;
return;
default:
// silence compiler warning
break;
}
// linear interpolation - default
fill = (*beg).value + ((*end).value - (*beg).value)*(float)(((time - (*beg).time) / ((*end).time - (*beg).time)));
@@ -383,9 +396,9 @@ void AnimResolver::GetKeys(std::vector<aiVectorKey>& out,
LWO::Envelope def_x, def_y, def_z;
LWO::Key key_dummy;
key_dummy.time = 0.f;
if (envl_x && envl_x->type == LWO::EnvelopeType_Scaling_X ||
envl_y && envl_y->type == LWO::EnvelopeType_Scaling_Y ||
envl_z && envl_z->type == LWO::EnvelopeType_Scaling_Z) {
if ((envl_x && envl_x->type == LWO::EnvelopeType_Scaling_X) ||
(envl_y && envl_y->type == LWO::EnvelopeType_Scaling_Y) ||
(envl_z && envl_z->type == LWO::EnvelopeType_Scaling_Z)) {
key_dummy.value = 1.f;
}
else key_dummy.value = 0.f;