mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:23:52 +00:00
Use const ref instead of value
This commit is contained in:
parent
32d4344803
commit
3232faa703
1 changed files with 5 additions and 5 deletions
|
@ -115,7 +115,7 @@ namespace OsgaController
|
|||
float newTime = time;
|
||||
|
||||
//Find the correct animation based on time
|
||||
for (auto emulatedAnimation : mEmulatedAnimations)
|
||||
for (const EmulatedAnimation& emulatedAnimation : mEmulatedAnimations)
|
||||
{
|
||||
if (time > emulatedAnimation.mStartTime && time < emulatedAnimation.mStopTime)
|
||||
{
|
||||
|
@ -125,7 +125,7 @@ namespace OsgaController
|
|||
}
|
||||
|
||||
//Find the root transform track in animation
|
||||
for (auto mergedAnimationTrack : mMergedAnimationTracks)
|
||||
for (const osg::ref_ptr<Resource::Animation> mergedAnimationTrack : mMergedAnimationTracks)
|
||||
{
|
||||
if (mergedAnimationTrack->getName() != animationName) continue;
|
||||
|
||||
|
@ -150,7 +150,7 @@ namespace OsgaController
|
|||
|
||||
void KeyframeController::update(float time, std::string animationName)
|
||||
{
|
||||
for (auto mergedAnimationTrack : mMergedAnimationTracks)
|
||||
for (const osg::ref_ptr<Resource::Animation> mergedAnimationTrack : mMergedAnimationTracks)
|
||||
{
|
||||
if (mergedAnimationTrack->getName() == animationName) mergedAnimationTrack->update(time);
|
||||
}
|
||||
|
@ -162,7 +162,7 @@ namespace OsgaController
|
|||
{
|
||||
if (mNeedToLink)
|
||||
{
|
||||
for (auto mergedAnimationTrack : mMergedAnimationTracks)
|
||||
for (const osg::ref_ptr<Resource::Animation> mergedAnimationTrack : mMergedAnimationTracks)
|
||||
{
|
||||
if (!mLinker.valid()) mLinker = new LinkVisitor();
|
||||
mLinker->setAnimation(mergedAnimationTrack);
|
||||
|
@ -173,7 +173,7 @@ namespace OsgaController
|
|||
|
||||
float time = getInputValue(nv);
|
||||
|
||||
for (auto emulatedAnimation : mEmulatedAnimations)
|
||||
for (const EmulatedAnimation& emulatedAnimation : mEmulatedAnimations)
|
||||
{
|
||||
if (time > emulatedAnimation.mStartTime && time < emulatedAnimation.mStopTime)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue