Use rbegin() instead of --end()

deque
scrawl 10 years ago
parent 0eb949c8a7
commit 819234cdfe

@ -35,7 +35,7 @@ namespace NifOgre
return aLastKey->mValue + ((aKey->mValue - aLastKey->mValue) * a); return aLastKey->mValue + ((aKey->mValue - aLastKey->mValue) * a);
} }
else else
return (--keys.end())->second.mValue; return keys.rbegin()->second.mValue;
} }
Ogre::Vector3 interpKey(const Nif::Vector3KeyMap::MapType &keys, float time) const Ogre::Vector3 interpKey(const Nif::Vector3KeyMap::MapType &keys, float time) const
@ -59,7 +59,7 @@ namespace NifOgre
return aLastKey->mValue + ((aKey->mValue - aLastKey->mValue) * a); return aLastKey->mValue + ((aKey->mValue - aLastKey->mValue) * a);
} }
else else
return (--keys.end())->second.mValue; return keys.rbegin()->second.mValue;
} }
}; };

@ -437,7 +437,7 @@ public:
return Ogre::Quaternion::nlerp(a, aLastKey->mValue, aKey->mValue); return Ogre::Quaternion::nlerp(a, aLastKey->mValue, aKey->mValue);
} }
else else
return (--keys.end())->second.mValue; return keys.rbegin()->second.mValue;
} }
public: public:

Loading…
Cancel
Save