Changed: #825 Remove all warning when compiling Ryzom on Linux

This commit is contained in:
kervala 2010-06-11 11:20:51 +02:00
parent 9d648db9a6
commit 26ed6795f4
12 changed files with 51 additions and 19 deletions

View file

@ -2291,6 +2291,8 @@ void CCharacterCL::endAnimTransition()
dir(front()); dir(front());
*/ */
break; break;
default:
break;
} }
// Change the current mode. // Change the current mode.
if ( _ModeWanted != MBEHAV::UNKNOWN_MODE ) if ( _ModeWanted != MBEHAV::UNKNOWN_MODE )
@ -2658,6 +2660,8 @@ KeyChosen:
else 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()); 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; break;
default:
break;
} }
// On Rotation/About Face // On Rotation/About Face
@ -2684,6 +2688,8 @@ KeyChosen:
else 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()); 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; break;
default:
break;
} }
// Max Loop // Max Loop
@ -2729,6 +2735,8 @@ KeyChosen:
else 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()); 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; break;
default:
break;
} }
// If the animation change according to a high speed and speed high enough or oo. // 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::CastLoop: afs = &_CurrentAttack->AttackLoopFX; break;
case MAGICFX::CastEnd: afs = &_CurrentAttack->AttackEndFX; break; case MAGICFX::CastEnd: afs = &_CurrentAttack->AttackEndFX; break;
case MAGICFX::CastFail: afs = &_CurrentAttack->AttackFailFX; break; case MAGICFX::CastFail: afs = &_CurrentAttack->AttackFailFX; break;
default: break;
} }
playCastFX(afs, _CurrentAttackInfo.Intensity); playCastFX(afs, _CurrentAttackInfo.Intensity);
} }
@ -3444,6 +3453,8 @@ ADD_METHOD(void CCharacterCL::updateAnimationState())
case OnMoveRight: case OnMoveRight:
setAnim(_CurrentState->OnMoveRight); setAnim(_CurrentState->OnMoveRight);
return; return;
default:
break;
} }
// ON ROTATION // ON ROTATION
@ -3458,6 +3469,8 @@ ADD_METHOD(void CCharacterCL::updateAnimationState())
case OnRotRight: case OnRotRight:
setAnim(CAnimationStateSheet::Idle); setAnim(CAnimationStateSheet::Idle);
return; return;
default:
break;
} }
// ON BAD HEADING // ON BAD HEADING
@ -3475,6 +3488,8 @@ ADD_METHOD(void CCharacterCL::updateAnimationState())
case OnBendRight: case OnBendRight:
setAnim(_CurrentState->MoveState); setAnim(_CurrentState->MoveState);
return; return;
default:
break;
} }
// \todo GUIGUI : changer de place cette partie je pense. // \todo GUIGUI : changer de place cette partie je pense.
@ -3640,6 +3655,8 @@ void CCharacterCL::beginCast(const MBEHAV::CBehaviour &behaviour)
case MBEHAV::CAST_STUN: case MBEHAV::CAST_STUN:
setAnim(CAnimationStateSheet::StunCastInit); setAnim(CAnimationStateSheet::StunCastInit);
break; break;
default:
break;
} }
}// beginCast // }// beginCast //
@ -3746,6 +3763,8 @@ void CCharacterCL::endCast(const MBEHAV::CBehaviour &behaviour, const MBEHAV::CB
case MBEHAV::CAST_MIX_LINK: case MBEHAV::CAST_MIX_LINK:
setAnim(CAnimationStateSheet::MixedCastLink); setAnim(CAnimationStateSheet::MixedCastLink);
break; break;
default:
break;
} }
} }
break; break;
@ -4443,8 +4462,9 @@ bool CCharacterCL::isCurrentBehaviourAttackEnd() const
case MBEHAV::POWERFUL_ATTACK: case MBEHAV::POWERFUL_ATTACK:
case MBEHAV::AREA_ATTACK: case MBEHAV::AREA_ATTACK:
return true; return true;
} default:
return false; return false;
}
} }
@ -4627,6 +4647,8 @@ void CCharacterCL::applyBehaviour(const CBehaviourContext &bc) // virtual
case RANGE_ATTACK: case RANGE_ATTACK:
combatAnimState= CAnimationStateSheet::Attack1; combatAnimState= CAnimationStateSheet::Attack1;
break; break;
default:
break;
} }
} }
} }
@ -9151,6 +9173,8 @@ void CCharacterCL::CWornItem::startAttackFX(NL3D::USkeleton skeleton, uint inten
else else
stickPoint = "box_arme_gauche"; stickPoint = "box_arme_gauche";
break; break;
default:
break;
} }
} }
if (stickPoint) if (stickPoint)

View file

@ -233,7 +233,7 @@ public:
void sheetId(const NLMISC::CSheetId &id) {_SheetId = id;} void sheetId(const NLMISC::CSheetId &id) {_SheetId = id;}
/// Return the persistent NPC alias of entity (0 if N/A). /// 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. /// Set the persistent NPC alias of the entity.
void npcAlias(uint32 alias) {_NPCAlias = alias; } void npcAlias(uint32 alias) {_NPCAlias = alias; }
@ -411,7 +411,7 @@ public:
/// Return the entity current behaviour. /// 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. * Show or Hide the entity.

View file

@ -167,7 +167,7 @@ void CInterfaceItemEdition::CItemEditionWindow::infoReceived()
// ******************************************************************************************** // ********************************************************************************************
void CInterfaceItemEdition::CItemEditionWindow::update() void CInterfaceItemEdition::CItemEditionWindow::update()
{ {
if(_CurrItemSheet && (ItemSheet != _CurrItemSheet->getSheetId())) if(_CurrItemSheet && ((sint32)ItemSheet != _CurrItemSheet->getSheetId()))
{ {
end(); end();
} }

View file

@ -81,7 +81,7 @@ private:
virtual void chatWindowRemoved(CChatWindow *cw); virtual void chatWindowRemoved(CChatWindow *cw);
// //
// copy not supported // 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; } CChatInputFilter &operator=(const CChatInputFilter &/* other */) { nlassert(0); return *this; }
}; };
@ -157,7 +157,7 @@ private:
void chatWindowRemoved(CChatWindow *cw); void chatWindowRemoved(CChatWindow *cw);
void msgEntered(const ucstring &msg, CChatWindow *chatWindow); void msgEntered(const ucstring &msg, CChatWindow *chatWindow);
// copy not supported // 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; } CChatTargetFilter& operator=(const CChatTargetFilter &/* other */) { nlassert(0); return *this; }
}; };

View file

@ -230,7 +230,7 @@ void CGroupCompas::draw()
// //
const NLMISC::CVectorD &userPosD = UserEntity->pos(); const NLMISC::CVectorD &userPosD = UserEntity->pos();
NLMISC::CVector userPos((float) userPosD.x, (float) userPosD.y, (float) userPosD.z); 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 // if a position tracker is provided, use it
CCompassTarget displayedTarget = _Target; CCompassTarget displayedTarget = _Target;
@ -807,7 +807,7 @@ void CGroupCompasMenu::setActive (bool state)
uint nbUserLandMarks = std::min( uint(currCont->UserLandMarks.size()), CContinent::getMaxNbUserLandMarks() ); uint nbUserLandMarks = std::min( uint(currCont->UserLandMarks.size()), CContinent::getMaxNbUserLandMarks() );
for(k = 0; k < nbUserLandMarks; ++k) 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; CCompassTarget ct;
ct.setType(CCompassTarget::UserLandMark); ct.setType(CCompassTarget::UserLandMark);

View file

@ -634,6 +634,7 @@ bool CGroupMap::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
case EGSPD::CPeople::Matis: loadLandmarkInfo(cur, "home_matis", _HomeLMOptions); break; case EGSPD::CPeople::Matis: loadLandmarkInfo(cur, "home_matis", _HomeLMOptions); break;
case EGSPD::CPeople::Zorai: loadLandmarkInfo(cur, "home_zorai", _HomeLMOptions); break; case EGSPD::CPeople::Zorai: loadLandmarkInfo(cur, "home_zorai", _HomeLMOptions); break;
case EGSPD::CPeople::Tryker: loadLandmarkInfo(cur, "home_tryker", _HomeLMOptions); break; case EGSPD::CPeople::Tryker: loadLandmarkInfo(cur, "home_tryker", _HomeLMOptions); break;
default: break;
} }
loadLandmarkInfo(cur, "respawn", _RespawnLMOptions); loadLandmarkInfo(cur, "respawn", _RespawnLMOptions);
// animal landmark // animal landmark

View file

@ -354,7 +354,7 @@ private:
private: private:
// this object isn't intended to be copied // 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; } CLuaState &operator=(const CLuaState &/* other */) { nlassert(0); return *this; }
void executeScriptInternal(const std::string &code, const std::string &dbgSrc, int numRet = 0); void executeScriptInternal(const std::string &code, const std::string &dbgSrc, int numRet = 0);

View file

@ -611,16 +611,19 @@ void CModalContainerEditCmd::activateFrom (const std::string &cmdName, const std
// Get ith param (params are nameOfParam=argumentOfAction strings separated by |) // 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 // except for the last real param (which can then contains | chars) if it is the last param
if ((curStr.find('|') == string::npos) || string::size_type pos = curStr.find('|');
((noParam == nbRealParam-1) && (rP.Type != CBaseAction::CParameter::Hidden)) && (i == (pBA->Parameters.size()-1)))
if ((pos == string::npos) ||
(((noParam == nbRealParam-1) && (rP.Type != CBaseAction::CParameter::Hidden)) && (i == (pBA->Parameters.size()-1))))
{ {
sTmp = curStr; sTmp = curStr;
curStr = ""; curStr = "";
} }
else 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=' // Remove 'name='

View file

@ -289,13 +289,17 @@ void CChatStdInput::registerListeningWindow(CChatWindow *cw)
Universe.addListeningWindow(cw); Universe.addListeningWindow(cw);
} }
//=========================================================================================================== //===========================================================================================================
CPeopleInterraction::CPeopleInterraction() : SystemInfo(NULL), CPeopleInterraction::CPeopleInterraction() : Region(NULL),
Universe(NULL),
TeamChat(NULL),
GuildChat(NULL), GuildChat(NULL),
CurrPartyChatID(0), SystemInfo(NULL),
TellWindow(NULL), TellWindow(NULL),
DebugInfo(NULL), DebugInfo(NULL),
YuboChat(NULL) YuboChat(NULL),
CurrPartyChatID(0)
{ {
for(uint i=0;i<CChatGroup::MaxDynChanPerPlayer;i++) for(uint i=0;i<CChatGroup::MaxDynChanPerPlayer;i++)
{ {

View file

@ -53,7 +53,7 @@ private:
class CEntityEntry class CEntityEntry
{ {
public: public:
CEntityEntry() : EntryUsed(false), PosIsRelative(false), AssociationBits(0) {} CEntityEntry() : AssociationBits(0), EntryUsed(false), PosIsRelative(false), PosIsInterior(false) {}
CLFECOMMON::TSheetId Sheet; CLFECOMMON::TSheetId Sheet;
uint16 AssociationBits; uint16 AssociationBits;
bool EntryUsed; bool EntryUsed;

View file

@ -318,7 +318,7 @@ namespace MBEHAV
} }
/// Cons cast into behaviour enum /// Cons cast into behaviour enum
operator const EBehaviour () const operator EBehaviour () const
{ {
return (EBehaviour)Behaviour8; return (EBehaviour)Behaviour8;
} }

View file

@ -34,7 +34,7 @@ public:
operator std::string() const { return std::string(_Value); } operator std::string() const { return std::string(_Value); }
bool operator ! () const { return _Value == NULL; } bool operator ! () const { return _Value == NULL; }
operator const unsigned char *() const { return (const unsigned char *) _Value; } operator const unsigned char *() const { return (const unsigned char *) _Value; }
const char operator * () const { nlassert(_Value); return *_Value; } char operator * () const { nlassert(_Value); return *_Value; }
/// NB : This remove previous owned pointer with xmlFree /// NB : This remove previous owned pointer with xmlFree
CXMLAutoPtr &operator = (const char *other) CXMLAutoPtr &operator = (const char *other)
{ {