From 81509b3e92e4a13b3129a97a6ef71e5fcc15869e Mon Sep 17 00:00:00 2001 From: luiscuenca Date: Thu, 2 Nov 2017 10:34:57 -0700 Subject: [PATCH] coding standard --- libraries/animation/src/Rig.cpp | 7 +++---- libraries/animation/src/Rig.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/libraries/animation/src/Rig.cpp b/libraries/animation/src/Rig.cpp index 9df12de540..acf7bf81d8 100644 --- a/libraries/animation/src/Rig.cpp +++ b/libraries/animation/src/Rig.cpp @@ -152,7 +152,7 @@ void Rig::overrideRoleAnimation(const QString& role, const QString& url, float f const float REFERENCE_FRAMES_PER_SECOND = 30.0f; float timeScale = fps / REFERENCE_FRAMES_PER_SECOND; auto clipNode = std::make_shared(role, url, firstFrame, lastFrame, timeScale, loop, false); - _roleAnimState[role] = { role, url, fps, loop, firstFrame, lastFrame }; + _roleAnimStates[role] = { role, url, fps, loop, firstFrame, lastFrame }; AnimNode::Pointer parent = node->getParent(); parent->replaceChild(node, clipNode); } else { @@ -1640,9 +1640,8 @@ void Rig::initAnimGraph(const QUrl& url) { overrideAnimation(origState.url, origState.fps, origState.loop, origState.firstFrame, origState.lastFrame); } // restore the role animations we had before reset. - for (auto ite = _roleAnimState.begin(); ite != _roleAnimState.end(); ite++) { - auto role = ite->first; - auto roleState = _roleAnimState[role]; + for (auto& roleAnimState : _roleAnimStates) { + auto roleState = roleAnimState.second; overrideRoleAnimation(roleState.role, roleState.url, roleState.fps, roleState.loop, roleState.firstFrame, roleState.lastFrame); } _animLoading = false; diff --git a/libraries/animation/src/Rig.h b/libraries/animation/src/Rig.h index 8ca701ec2d..e9cc444bd4 100644 --- a/libraries/animation/src/Rig.h +++ b/libraries/animation/src/Rig.h @@ -350,7 +350,7 @@ protected: }; UserAnimState _userAnimState; - std::map _roleAnimState; + std::map _roleAnimStates; float _leftHandOverlayAlpha { 0.0f }; float _rightHandOverlayAlpha { 0.0f };