Fixed: some gcc warning

This commit is contained in:
vl 2010-07-13 11:05:21 +02:00
parent 4e87d65d87
commit dee391151a
5 changed files with 9 additions and 9 deletions

View file

@ -1274,10 +1274,10 @@ void getDamageText(CDBCtrlSheet *item, const CItemSheet*pIS, ucstring &itemText,
string strMod; string strMod;
if(displayAsMod) if(displayAsMod)
strMod= itemInfo.CurrentDamage>=0?"+":""; strMod= "+";
strFindReplace(itemText, "%dmg", strMod + toString(itemInfo.CurrentDamage)); strFindReplace(itemText, "%dmg", strMod + toString(itemInfo.CurrentDamage));
if(displayAsMod) if(displayAsMod)
strMod= itemInfo.MaxDamage>=0?"+":""; strMod= "+";
strFindReplace(itemText, "%max_dmg", strMod + toString(itemInfo.MaxDamage)); strFindReplace(itemText, "%max_dmg", strMod + toString(itemInfo.MaxDamage));
if(pIS->Family!=ITEMFAMILY::AMMO) if(pIS->Family!=ITEMFAMILY::AMMO)

View file

@ -2473,7 +2473,7 @@ void CGroupHTML::setTitle (const ucstring &title)
CInterfaceElement *parent = getParent(); CInterfaceElement *parent = getParent();
if (parent) if (parent)
{ {
if (parent = parent->getParent()) if ((parent = parent->getParent()))
{ {
CGroupContainer *container = dynamic_cast<CGroupContainer*>(parent); CGroupContainer *container = dynamic_cast<CGroupContainer*>(parent);
if (container) if (container)

View file

@ -3391,7 +3391,7 @@ bool CInterfaceParser::parseActionCategory(xmlNodePtr cur)
nlwarning("<CInterfaceParser::parseActionCategory> cannot create instance from template"); nlwarning("<CInterfaceParser::parseActionCategory> cannot create instance from template");
} }
} }
while(instanceNode = CIXml::getNextChildNode(instanceNode, "instance")); while((instanceNode = CIXml::getNextChildNode(instanceNode, "instance")));
} }
parameter.Values.resize (CIXml::countChildren(paramNode, "value")); parameter.Values.resize (CIXml::countChildren(paramNode, "value"));
@ -3422,18 +3422,18 @@ bool CInterfaceParser::parseActionCategory(xmlNodePtr cur)
valueIndex++; valueIndex++;
} }
while(valueNode = CIXml::getNextChildNode(valueNode, "value")); while((valueNode = CIXml::getNextChildNode(valueNode, "value")));
} }
parameterIndex++; parameterIndex++;
} }
while(paramNode = CIXml::getNextChildNode(paramNode, "parameter")); while((paramNode = CIXml::getNextChildNode(paramNode, "parameter")));
} }
// Next action // Next action
actionIndex++; actionIndex++;
} }
while(actionNode = CIXml::getNextChildNode(actionNode, "action")); while((actionNode = CIXml::getNextChildNode(actionNode, "action")));
} }
// Add this category to the action manager // Add this category to the action manager

View file

@ -617,7 +617,7 @@ int CLuaIHM::luaMethodCall(lua_State *ls)
// //
state->remove(1); // remove 'self' reference from parameters stack state->remove(1); // remove 'self' reference from parameters stack
// //
int numResults; int numResults = 0;
int initialStackSize = state->getTop(); int initialStackSize = state->getTop();
try try
{ {

View file

@ -456,7 +456,7 @@ void CUserEntity::updateVisualPropertyBehaviour(const NLMISC::TGameCycle &/* gam
bc.BehavTime = TimeInSec; bc.BehavTime = TimeInSec;
if(VerboseAnimUser) if(VerboseAnimUser)
{ {
nlinfo("UE::updateVPBeha: '%d(%s)'.", bc.Behav.Behaviour, MBEHAV::behaviourToString(bc.Behav.Behaviour).c_str()); nlinfo("UE::updateVPBeha: '%d(%s)'.", (int)bc.Behav.Behaviour, MBEHAV::behaviourToString(bc.Behav.Behaviour).c_str());
} }
CCDBNodeLeaf *targetList0 = dynamic_cast<CCDBNodeLeaf *>(_DBEntry->getNode(CLFECOMMON::PROPERTY_TARGET_LIST_0)); CCDBNodeLeaf *targetList0 = dynamic_cast<CCDBNodeLeaf *>(_DBEntry->getNode(CLFECOMMON::PROPERTY_TARGET_LIST_0));
CCDBNodeLeaf *targetList1 = dynamic_cast<CCDBNodeLeaf *>(_DBEntry->getNode(CLFECOMMON::PROPERTY_TARGET_LIST_1)); CCDBNodeLeaf *targetList1 = dynamic_cast<CCDBNodeLeaf *>(_DBEntry->getNode(CLFECOMMON::PROPERTY_TARGET_LIST_1));