diff options
Diffstat (limited to 'indra/llcharacter')
-rw-r--r-- | indra/llcharacter/llanimationstates.cpp | 2 | ||||
-rw-r--r-- | indra/llcharacter/llbvhloader.cpp | 2 | ||||
-rw-r--r-- | indra/llcharacter/llcharacter.h | 4 | ||||
-rw-r--r-- | indra/llcharacter/llgesture.cpp | 2 | ||||
-rw-r--r-- | indra/llcharacter/lljoint.cpp | 10 | ||||
-rw-r--r-- | indra/llcharacter/llkeyframemotion.cpp | 6 | ||||
-rw-r--r-- | indra/llcharacter/llkeyframemotionparam.cpp | 14 | ||||
-rw-r--r-- | indra/llcharacter/llmotioncontroller.cpp | 6 | ||||
-rw-r--r-- | indra/llcharacter/llpose.cpp | 2 | ||||
-rw-r--r-- | indra/llcharacter/llstatemachine.cpp | 18 |
10 files changed, 33 insertions, 33 deletions
diff --git a/indra/llcharacter/llanimationstates.cpp b/indra/llcharacter/llanimationstates.cpp index c8709dda19..2e78e30405 100644 --- a/indra/llcharacter/llanimationstates.cpp +++ b/indra/llcharacter/llanimationstates.cpp @@ -379,7 +379,7 @@ LLUUID LLAnimationLibrary::stringToAnimState( const std::string& name, BOOL allo if (true_name) { - for (anim_map_t::value_type anim_pair : mAnimMap) + for (anim_map_t::value_type& anim_pair : mAnimMap) { if (anim_pair.second == true_name) { diff --git a/indra/llcharacter/llbvhloader.cpp b/indra/llcharacter/llbvhloader.cpp index 70f6c0c4c9..47c6d6a7bb 100644 --- a/indra/llcharacter/llbvhloader.cpp +++ b/indra/llcharacter/llbvhloader.cpp @@ -156,7 +156,7 @@ LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &error } // Recognize all names we've been told are legal. - for (std::map<std::string, std::string>::value_type alias_pair : joint_alias_map) + for (std::map<std::string, std::string>::value_type& alias_pair : joint_alias_map) { makeTranslation( alias_pair.first , alias_pair.second ); } diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h index bc0c2ec0d3..6d56d59e8c 100644 --- a/indra/llcharacter/llcharacter.h +++ b/indra/llcharacter/llcharacter.h @@ -218,7 +218,7 @@ public: S32 getVisualParamCountInGroup(const EVisualParamGroup group) const { S32 rtn = 0; - for (visual_param_index_map_t::value_type index_pair : mVisualParamIndexMap) + for (const visual_param_index_map_t::value_type& index_pair : mVisualParamIndexMap) { if (index_pair.second->getGroup() == group) { @@ -235,7 +235,7 @@ public: } S32 getVisualParamID(LLVisualParam *id) { - for (visual_param_index_map_t::value_type index_pair : mVisualParamIndexMap) + for (visual_param_index_map_t::value_type& index_pair : mVisualParamIndexMap) { if (index_pair.second == id) return index_pair.first; diff --git a/indra/llcharacter/llgesture.cpp b/indra/llcharacter/llgesture.cpp index e9a4475707..80717d8d26 100644 --- a/indra/llcharacter/llgesture.cpp +++ b/indra/llcharacter/llgesture.cpp @@ -200,7 +200,7 @@ BOOL LLGestureList::triggerAndReviseString(const std::string &string, std::strin boost::char_separator<char> sep(" "); tokenizer tokens(string, sep); - for(std::string cur_token : tokens) + for(const std::string& cur_token : tokens) { LLGesture* gesture = NULL; diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index 282db5c88b..280641a1a5 100644 --- a/indra/llcharacter/lljoint.cpp +++ b/indra/llcharacter/lljoint.cpp @@ -67,7 +67,7 @@ void LLVector3OverrideMap::showJointVector3Overrides( std::ostringstream& os ) c map_type::const_iterator max_it = std::max_element(m_map.begin(), m_map.end(), attachment_map_iter_compare_key<map_type::value_type>); - for (const map_type::value_type pos_pair : m_map) + for (const map_type::value_type& pos_pair : m_map) { const LLVector3& pos = pos_pair.second; os << " " << "[" << pos_pair.first <<": " << pos << "]" << ((pos_pair==(*max_it)) ? "*" : ""); @@ -509,7 +509,7 @@ void LLJoint::getAllAttachmentPosOverrides(S32& num_pos_overrides, std::set<LLVector3>& distinct_pos_overrides) const { num_pos_overrides = m_attachmentPosOverrides.count(); - for (LLVector3OverrideMap::map_type::value_type pos_override_pair : m_attachmentPosOverrides.getMap()) + for (const LLVector3OverrideMap::map_type::value_type& pos_override_pair : m_attachmentPosOverrides.getMap()) { distinct_pos_overrides.insert(pos_override_pair.second); } @@ -522,7 +522,7 @@ void LLJoint::getAllAttachmentScaleOverrides(S32& num_scale_overrides, std::set<LLVector3>& distinct_scale_overrides) const { num_scale_overrides = m_attachmentScaleOverrides.count(); - for (LLVector3OverrideMap::map_type::value_type scale_override_pair : m_attachmentScaleOverrides.getMap()) + for (const LLVector3OverrideMap::map_type::value_type& scale_override_pair : m_attachmentScaleOverrides.getMap()) { distinct_scale_overrides.insert(scale_override_pair.second); } @@ -549,7 +549,7 @@ void LLJoint::showAttachmentPosOverrides(const std::string& av_info) const { LL_DEBUGS("Avatar") << "av " << av_info << " joint " << getName() << " has " << count << " attachment pos overrides" << LL_ENDL; std::set<LLVector3> distinct_offsets; - for (LLVector3OverrideMap::map_type::value_type pos_override_pair : m_attachmentPosOverrides.getMap()) + for (const LLVector3OverrideMap::map_type::value_type& pos_override_pair : m_attachmentPosOverrides.getMap()) { distinct_offsets.insert(pos_override_pair.second); } @@ -708,7 +708,7 @@ void LLJoint::showAttachmentScaleOverrides(const std::string& av_info) const { LL_DEBUGS("Avatar") << "av " << av_info << " joint " << getName() << " has " << count << " attachment scale overrides" << LL_ENDL; std::set<LLVector3> distinct_offsets; - for (LLVector3OverrideMap::map_type::value_type scale_override_pair : m_attachmentScaleOverrides.getMap()) + for (const LLVector3OverrideMap::map_type::value_type& scale_override_pair : m_attachmentScaleOverrides.getMap()) { distinct_offsets.insert(scale_override_pair.second); } diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index 04c1475161..d82ce23b4b 100644 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -1999,7 +1999,7 @@ BOOL LLKeyframeMotion::serialize(LLDataPacker& dp) const success &= dp.packS32(joint_motionp->mRotationCurve.mNumKeys, "num_rot_keys"); LL_DEBUGS("BVH") << "Joint " << joint_motionp->mJointName << LL_ENDL; - for (RotationCurve::key_map_t::value_type rot_pair : joint_motionp->mRotationCurve.mKeys) + for (RotationCurve::key_map_t::value_type& rot_pair : joint_motionp->mRotationCurve.mKeys) { RotationKey& rot_key = rot_pair.second; U16 time_short = F32_to_U16(rot_key.mTime, 0.f, mJointMotionList->mDuration); @@ -2020,7 +2020,7 @@ BOOL LLKeyframeMotion::serialize(LLDataPacker& dp) const } success &= dp.packS32(joint_motionp->mPositionCurve.mNumKeys, "num_pos_keys"); - for (PositionCurve::key_map_t::value_type pos_pair : joint_motionp->mPositionCurve.mKeys) + for (PositionCurve::key_map_t::value_type& pos_pair : joint_motionp->mPositionCurve.mKeys) { PositionKey& pos_key = pos_pair.second; U16 time_short = F32_to_U16(pos_key.mTime, 0.f, mJointMotionList->mDuration); @@ -2394,7 +2394,7 @@ void LLKeyframeDataCache::dumpDiagInfo() LL_INFOS() << "-----------------------------------------------------" << LL_ENDL; // print each loaded mesh, and it's memory usage - for (keyframe_data_map_t::value_type data_pair : sKeyframeDataMap) + for (keyframe_data_map_t::value_type& data_pair : sKeyframeDataMap) { U32 joint_motion_kb; diff --git a/indra/llcharacter/llkeyframemotionparam.cpp b/indra/llcharacter/llkeyframemotionparam.cpp index fce445fee7..c80aabe294 100644 --- a/indra/llcharacter/llkeyframemotionparam.cpp +++ b/indra/llcharacter/llkeyframemotionparam.cpp @@ -64,7 +64,7 @@ LLKeyframeMotionParam::LLKeyframeMotionParam( const LLUUID &id) : LLMotion(id) //----------------------------------------------------------------------------- LLKeyframeMotionParam::~LLKeyframeMotionParam() { - for (motion_map_t::value_type motion_pair : mParameterizedMotions) + for (motion_map_t::value_type& motion_pair : mParameterizedMotions) { motion_list_t& motionList = motion_pair.second; for (const ParameterizedMotion& paramMotion : motionList) @@ -88,7 +88,7 @@ LLMotion::LLMotionInitStatus LLKeyframeMotionParam::onInitialize(LLCharacter *ch return STATUS_FAILURE; } - for (motion_map_t::value_type motion_pair : mParameterizedMotions) + for (motion_map_t::value_type& motion_pair : mParameterizedMotions) { motion_list_t& motionList = motion_pair.second; for (const ParameterizedMotion& paramMotion : motionList) @@ -135,7 +135,7 @@ LLMotion::LLMotionInitStatus LLKeyframeMotionParam::onInitialize(LLCharacter *ch //----------------------------------------------------------------------------- BOOL LLKeyframeMotionParam::onActivate() { - for (motion_map_t::value_type motion_pair : mParameterizedMotions) + for (motion_map_t::value_type& motion_pair : mParameterizedMotions) { motion_list_t& motionList = motion_pair.second; for (const ParameterizedMotion& paramMotion : motionList) @@ -156,7 +156,7 @@ BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask) F32 weightFactor = 1.f / (F32)mParameterizedMotions.size(); // zero out all pose weights - for (motion_map_t::value_type motion_pair : mParameterizedMotions) + for (motion_map_t::value_type& motion_pair : mParameterizedMotions) { motion_list_t& motionList = motion_pair.second; for (const ParameterizedMotion& paramMotion : motionList) @@ -167,7 +167,7 @@ BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask) } - for (motion_map_t::value_type motion_pair : mParameterizedMotions) + for (motion_map_t::value_type& motion_pair : mParameterizedMotions) { const std::string& paramName = motion_pair.first; F32* paramValue = (F32 *)mCharacter->getAnimationData(paramName); @@ -270,7 +270,7 @@ BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask) //----------------------------------------------------------------------------- void LLKeyframeMotionParam::onDeactivate() { - for (motion_map_t::value_type motion_pair : mParameterizedMotions) + for (motion_map_t::value_type& motion_pair : mParameterizedMotions) { motion_list_t& motionList = motion_pair.second; for (const ParameterizedMotion& paramMotion : motionList) @@ -306,7 +306,7 @@ BOOL LLKeyframeMotionParam::addKeyframeMotion(char *name, const LLUUID &id, char //----------------------------------------------------------------------------- void LLKeyframeMotionParam::setDefaultKeyframeMotion(char *name) { - for (motion_map_t::value_type motion_pair : mParameterizedMotions) + for (motion_map_t::value_type& motion_pair : mParameterizedMotions) { motion_list_t& motionList = motion_pair.second; for (const ParameterizedMotion& paramMotion : motionList) diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index 8716fbff56..96e0d5e8d7 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -1053,7 +1053,7 @@ LLMotion* LLMotionController::findMotion(const LLUUID& id) const void LLMotionController::dumpMotions() { LL_INFOS() << "=====================================" << LL_ENDL; - for (motion_map_t::value_type motion_pair : mAllMotions) + for (motion_map_t::value_type& motion_pair : mAllMotions) { LLUUID id = motion_pair.first; std::string state_string; @@ -1076,7 +1076,7 @@ void LLMotionController::dumpMotions() //----------------------------------------------------------------------------- void LLMotionController::deactivateAllMotions() { - for (motion_map_t::value_type motion_pair : mAllMotions) + for (motion_map_t::value_type& motion_pair : mAllMotions) { LLMotion* motionp = motion_pair.second; deactivateMotionInstance(motionp); @@ -1110,7 +1110,7 @@ void LLMotionController::flushAllMotions() mCharacter->removeAnimationData("Hand Pose"); // restart motions - for (std::vector<std::pair<LLUUID,F32> >::value_type motion_pair : active_motions) + for (std::vector<std::pair<LLUUID,F32> >::value_type& motion_pair : active_motions) { startMotion(motion_pair.first, motion_pair.second); } diff --git a/indra/llcharacter/llpose.cpp b/indra/llcharacter/llpose.cpp index a7156a250b..6f41a0e747 100644 --- a/indra/llcharacter/llpose.cpp +++ b/indra/llcharacter/llpose.cpp @@ -148,7 +148,7 @@ LLJointState* LLPose::findJointState(const std::string &name) void LLPose::setWeight(F32 weight) { joint_map_iterator iter; - for (joint_map_value_type joint_pair : mJointMap) + for (joint_map_value_type& joint_pair : mJointMap) { joint_pair.second->setWeight(weight); } diff --git a/indra/llcharacter/llstatemachine.cpp b/indra/llcharacter/llstatemachine.cpp index 320381e91e..2e8214ffaf 100644 --- a/indra/llcharacter/llstatemachine.cpp +++ b/indra/llcharacter/llstatemachine.cpp @@ -169,7 +169,7 @@ void LLStateDiagram::setDefaultState(LLFSMState& default_state) S32 LLStateDiagram::numDeadendStates() { S32 numDeadends = 0; - for (StateMap::value_type state_pair : mStates) + for (StateMap::value_type& state_pair : mStates) { if (state_pair.second.size() == 0) { @@ -190,7 +190,7 @@ BOOL LLStateDiagram::stateIsValid(LLFSMState& state) LLFSMState* LLStateDiagram::getState(U32 state_id) { - for (StateMap::value_type state_pair : mStates) + for (StateMap::value_type& state_pair : mStates) { if (state_pair.first->getID() == state_id) { @@ -213,13 +213,13 @@ BOOL LLStateDiagram::saveDotFile(const std::string& filename) } apr_file_printf(dot_file, "digraph StateMachine {\n\tsize=\"100,100\";\n\tfontsize=40;\n\tlabel=\"Finite State Machine\";\n\torientation=landscape\n\tratio=.77\n"); - for (StateMap::value_type state_pair : mStates) + for (StateMap::value_type& state_pair : mStates) { apr_file_printf(dot_file, "\t\"%s\" [fontsize=28,shape=box]\n", state_pair.first->getName().c_str()); } apr_file_printf(dot_file, "\t\"All States\" [fontsize=30,style=bold,shape=box]\n"); - for (Transitions::value_type transition_pair : mDefaultTransitions) + for (Transitions::value_type& transition_pair : mDefaultTransitions) { apr_file_printf(dot_file, "\t\"All States\" -> \"%s\" [label = \"%s\",fontsize=24];\n", transition_pair.second->getName().c_str(), transition_pair.second->getName().c_str()); @@ -231,11 +231,11 @@ BOOL LLStateDiagram::saveDotFile(const std::string& filename) } - for (StateMap::value_type state_pair : mStates) + for (StateMap::value_type& state_pair : mStates) { LLFSMState *state = state_pair.first; - for (Transitions::value_type transition_pair : state_pair.second) + for (Transitions::value_type& transition_pair : state_pair.second) { std::string state_name = state->getName(); std::string target_name = transition_pair.second->getName(); @@ -258,15 +258,15 @@ std::ostream& operator<<(std::ostream &s, LLStateDiagram &FSM) s << "Default State: " << FSM.mDefaultState->getName() << "\n"; } - for (LLStateDiagram::Transitions::value_type transition_pair : FSM.mDefaultTransitions) + for (LLStateDiagram::Transitions::value_type& transition_pair : FSM.mDefaultTransitions) { s << "Any State -- " << transition_pair.first->getName() << " --> " << transition_pair.second->getName() << "\n"; } - for (LLStateDiagram::StateMap::value_type state_pair : FSM.mStates) + for (LLStateDiagram::StateMap::value_type& state_pair : FSM.mStates) { - for (LLStateDiagram::Transitions::value_type transition_pair : state_pair.second) + for (LLStateDiagram::Transitions::value_type& transition_pair : state_pair.second) { s << state_pair.first->getName() << " -- " << transition_pair.first->getName() << " --> " << transition_pair.second->getName() << "\n"; |