diff --git a/code/ryzom/client/src/character_cl.cpp b/code/ryzom/client/src/character_cl.cpp index 7e06c5e1a..c9e4c87da 100644 --- a/code/ryzom/client/src/character_cl.cpp +++ b/code/ryzom/client/src/character_cl.cpp @@ -2291,6 +2291,8 @@ void CCharacterCL::endAnimTransition() dir(front()); */ break; + default: + break; } // Change the current mode. if ( _ModeWanted != MBEHAV::UNKNOWN_MODE ) @@ -2658,6 +2660,8 @@ KeyChosen: else nlwarning("CH::setAnim:%d: automaton '%s': state '%s': OnMoveRight '%s' is not valid.", _Slot, _CurrentAutomaton.c_str(), CAnimationState::getAnimationStateName(curAnimState.MoveState).c_str(), CAnimationState::getAnimationStateName(curAnimState.OnMoveRight).c_str()); break; + default: + break; } // On Rotation/About Face @@ -2684,6 +2688,8 @@ KeyChosen: else nlwarning("CH::setAnim:%d: automaton '%s': state '%s': OnRightRotation '%s' is not valid.", _Slot, _CurrentAutomaton.c_str(), CAnimationState::getAnimationStateName(curAnimState.MoveState).c_str(), CAnimationState::getAnimationStateName(curAnimState.OnRightRotation).c_str()); break; + default: + break; } // Max Loop @@ -2729,6 +2735,8 @@ KeyChosen: else nlwarning("CH::setAnim:%d: automaton '%s': state '%s': OnBigBendRight '%s' is not valid.", _Slot, _CurrentAutomaton.c_str(), CAnimationState::getAnimationStateName(curAnimState.MoveState).c_str(), CAnimationState::getAnimationStateName(curAnimState.OnBigBendRight).c_str()); break; + default: + break; } // If the animation change according to a high speed and speed high enough or oo. @@ -3084,6 +3092,7 @@ KeyChosen: case MAGICFX::CastLoop: afs = &_CurrentAttack->AttackLoopFX; break; case MAGICFX::CastEnd: afs = &_CurrentAttack->AttackEndFX; break; case MAGICFX::CastFail: afs = &_CurrentAttack->AttackFailFX; break; + default: break; } playCastFX(afs, _CurrentAttackInfo.Intensity); } @@ -3444,6 +3453,8 @@ ADD_METHOD(void CCharacterCL::updateAnimationState()) case OnMoveRight: setAnim(_CurrentState->OnMoveRight); return; + default: + break; } // ON ROTATION @@ -3458,6 +3469,8 @@ ADD_METHOD(void CCharacterCL::updateAnimationState()) case OnRotRight: setAnim(CAnimationStateSheet::Idle); return; + default: + break; } // ON BAD HEADING @@ -3475,6 +3488,8 @@ ADD_METHOD(void CCharacterCL::updateAnimationState()) case OnBendRight: setAnim(_CurrentState->MoveState); return; + default: + break; } // \todo GUIGUI : changer de place cette partie je pense. @@ -3640,6 +3655,8 @@ void CCharacterCL::beginCast(const MBEHAV::CBehaviour &behaviour) case MBEHAV::CAST_STUN: setAnim(CAnimationStateSheet::StunCastInit); break; + default: + break; } }// beginCast // @@ -3746,6 +3763,8 @@ void CCharacterCL::endCast(const MBEHAV::CBehaviour &behaviour, const MBEHAV::CB case MBEHAV::CAST_MIX_LINK: setAnim(CAnimationStateSheet::MixedCastLink); break; + default: + break; } } break; @@ -4443,8 +4462,9 @@ bool CCharacterCL::isCurrentBehaviourAttackEnd() const case MBEHAV::POWERFUL_ATTACK: case MBEHAV::AREA_ATTACK: return true; + default: + return false; } - return false; } @@ -4627,6 +4647,8 @@ void CCharacterCL::applyBehaviour(const CBehaviourContext &bc) // virtual case RANGE_ATTACK: combatAnimState= CAnimationStateSheet::Attack1; break; + default: + break; } } } @@ -9151,6 +9173,8 @@ void CCharacterCL::CWornItem::startAttackFX(NL3D::USkeleton skeleton, uint inten else stickPoint = "box_arme_gauche"; break; + default: + break; } } if (stickPoint) diff --git a/code/ryzom/client/src/entity_cl.h b/code/ryzom/client/src/entity_cl.h index 18e7a2afa..21402ee0d 100644 --- a/code/ryzom/client/src/entity_cl.h +++ b/code/ryzom/client/src/entity_cl.h @@ -233,7 +233,7 @@ public: void sheetId(const NLMISC::CSheetId &id) {_SheetId = id;} /// Return the persistent NPC alias of entity (0 if N/A). - const uint32 npcAlias() const {return _NPCAlias; } + uint32 npcAlias() const {return _NPCAlias; } /// Set the persistent NPC alias of the entity. void npcAlias(uint32 alias) {_NPCAlias = alias; } @@ -411,7 +411,7 @@ public: /// Return the entity current behaviour. - const MBEHAV::EBehaviour behaviour() const {return _CurrentBehaviour.Behaviour;} + MBEHAV::EBehaviour behaviour() const {return _CurrentBehaviour.Behaviour;} /** * Show or Hide the entity. diff --git a/code/ryzom/client/src/interface_v3/action_handler_item.cpp b/code/ryzom/client/src/interface_v3/action_handler_item.cpp index 4531e6a06..009829b9e 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_item.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_item.cpp @@ -167,7 +167,7 @@ void CInterfaceItemEdition::CItemEditionWindow::infoReceived() // ******************************************************************************************** void CInterfaceItemEdition::CItemEditionWindow::update() { - if(_CurrItemSheet && (ItemSheet != _CurrItemSheet->getSheetId())) + if(_CurrItemSheet && ((sint32)ItemSheet != _CurrItemSheet->getSheetId())) { end(); } diff --git a/code/ryzom/client/src/interface_v3/chat_filter.h b/code/ryzom/client/src/interface_v3/chat_filter.h index 31c4d1268..d288d9867 100644 --- a/code/ryzom/client/src/interface_v3/chat_filter.h +++ b/code/ryzom/client/src/interface_v3/chat_filter.h @@ -81,7 +81,7 @@ private: virtual void chatWindowRemoved(CChatWindow *cw); // // copy not supported - CChatInputFilter(const CChatInputFilter &/* other */) { nlassert(0); } + CChatInputFilter(const CChatInputFilter &/* other */):NLMISC::CRefCount() { nlassert(0); } CChatInputFilter &operator=(const CChatInputFilter &/* other */) { nlassert(0); return *this; } }; @@ -157,7 +157,7 @@ private: void chatWindowRemoved(CChatWindow *cw); void msgEntered(const ucstring &msg, CChatWindow *chatWindow); // copy not supported - CChatTargetFilter(const CChatTargetFilter &/* other */) { nlassert(0); } + CChatTargetFilter(const CChatTargetFilter &/* other */):NLMISC::CRefCount() { nlassert(0); } CChatTargetFilter& operator=(const CChatTargetFilter &/* other */) { nlassert(0); return *this; } }; diff --git a/code/ryzom/client/src/interface_v3/group_compas.cpp b/code/ryzom/client/src/interface_v3/group_compas.cpp index e642fa456..098e33b6a 100644 --- a/code/ryzom/client/src/interface_v3/group_compas.cpp +++ b/code/ryzom/client/src/interface_v3/group_compas.cpp @@ -230,7 +230,7 @@ void CGroupCompas::draw() // const NLMISC::CVectorD &userPosD = UserEntity->pos(); NLMISC::CVector userPos((float) userPosD.x, (float) userPosD.y, (float) userPosD.z); - NLMISC::CVector2f targetPos; + NLMISC::CVector2f targetPos(0.f, 0.f); // if a position tracker is provided, use it CCompassTarget displayedTarget = _Target; @@ -807,7 +807,7 @@ void CGroupCompasMenu::setActive (bool state) uint nbUserLandMarks = std::min( uint(currCont->UserLandMarks.size()), CContinent::getMaxNbUserLandMarks() ); for(k = 0; k < nbUserLandMarks; ++k) { - if (currCont->UserLandMarks[k].Type >= 0 && currCont->UserLandMarks[k].Type < CUserLandMark::UserLandMarkTypeCount) + if (currCont->UserLandMarks[k].Type < CUserLandMark::UserLandMarkTypeCount) { CCompassTarget ct; ct.setType(CCompassTarget::UserLandMark); diff --git a/code/ryzom/client/src/interface_v3/group_map.cpp b/code/ryzom/client/src/interface_v3/group_map.cpp index c1f1ccf3f..aa101c449 100644 --- a/code/ryzom/client/src/interface_v3/group_map.cpp +++ b/code/ryzom/client/src/interface_v3/group_map.cpp @@ -634,6 +634,7 @@ bool CGroupMap::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup) case EGSPD::CPeople::Matis: loadLandmarkInfo(cur, "home_matis", _HomeLMOptions); break; case EGSPD::CPeople::Zorai: loadLandmarkInfo(cur, "home_zorai", _HomeLMOptions); break; case EGSPD::CPeople::Tryker: loadLandmarkInfo(cur, "home_tryker", _HomeLMOptions); break; + default: break; } loadLandmarkInfo(cur, "respawn", _RespawnLMOptions); // animal landmark diff --git a/code/ryzom/client/src/interface_v3/lua_helper.h b/code/ryzom/client/src/interface_v3/lua_helper.h index c3f41c9d9..c8192dcff 100644 --- a/code/ryzom/client/src/interface_v3/lua_helper.h +++ b/code/ryzom/client/src/interface_v3/lua_helper.h @@ -354,7 +354,7 @@ private: private: // this object isn't intended to be copied - CLuaState(const CLuaState &/* other */) { nlassert(0); } + CLuaState(const CLuaState &/* other */):NLMISC::CRefCount() { nlassert(0); } CLuaState &operator=(const CLuaState &/* other */) { nlassert(0); return *this; } void executeScriptInternal(const std::string &code, const std::string &dbgSrc, int numRet = 0); diff --git a/code/ryzom/client/src/interface_v3/macrocmd_key.cpp b/code/ryzom/client/src/interface_v3/macrocmd_key.cpp index 4d16c523a..a6e4f15ba 100644 --- a/code/ryzom/client/src/interface_v3/macrocmd_key.cpp +++ b/code/ryzom/client/src/interface_v3/macrocmd_key.cpp @@ -611,16 +611,19 @@ void CModalContainerEditCmd::activateFrom (const std::string &cmdName, const std // Get ith param (params are nameOfParam=argumentOfAction strings separated by |) // except for the last real param (which can then contains | chars) if it is the last param - if ((curStr.find('|') == string::npos) || - ((noParam == nbRealParam-1) && (rP.Type != CBaseAction::CParameter::Hidden)) && (i == (pBA->Parameters.size()-1))) + string::size_type pos = curStr.find('|'); + + if ((pos == string::npos) || + (((noParam == nbRealParam-1) && (rP.Type != CBaseAction::CParameter::Hidden)) && (i == (pBA->Parameters.size()-1)))) { sTmp = curStr; curStr = ""; } else { - sTmp = curStr.substr(0,curStr.find('|')); - curStr = curStr.substr(curStr.find('|')+1,curStr.size()); + + sTmp = curStr.substr(0, pos); + curStr = curStr.substr(pos+1, curStr.size()); } // Remove 'name=' diff --git a/code/ryzom/client/src/interface_v3/people_interraction.cpp b/code/ryzom/client/src/interface_v3/people_interraction.cpp index 246df5d5f..17c6eadce 100644 --- a/code/ryzom/client/src/interface_v3/people_interraction.cpp +++ b/code/ryzom/client/src/interface_v3/people_interraction.cpp @@ -289,13 +289,17 @@ void CChatStdInput::registerListeningWindow(CChatWindow *cw) Universe.addListeningWindow(cw); } + //=========================================================================================================== -CPeopleInterraction::CPeopleInterraction() : SystemInfo(NULL), +CPeopleInterraction::CPeopleInterraction() : Region(NULL), + Universe(NULL), + TeamChat(NULL), GuildChat(NULL), - CurrPartyChatID(0), + SystemInfo(NULL), TellWindow(NULL), DebugInfo(NULL), - YuboChat(NULL) + YuboChat(NULL), + CurrPartyChatID(0) { for(uint i=0;i