Fixed: Some warnings

This commit is contained in:
kervala 2013-09-27 16:30:55 +02:00
parent bc8490adb7
commit 43bbfe3da7
7 changed files with 24 additions and 24 deletions

View file

@ -549,27 +549,27 @@ namespace NLGUI
if( editorMode ) if( editorMode )
{ {
prop = (char*) xmlGetProp( cur, BAD_CAST "onover" ); prop = (char*) xmlGetProp( cur, BAD_CAST "onover" );
if( prop != NULL ) if (prop)
mapAHString( "onover", std::string( (const char*)prop ) ); mapAHString( "onover", std::string( (const char*)prop ) );
prop = (char*) xmlGetProp( cur, BAD_CAST "onclick_l" ); prop = (char*) xmlGetProp( cur, BAD_CAST "onclick_l" );
if( prop != NULL ) if (prop)
mapAHString( "onclick_l", std::string( (const char*)prop ) ); mapAHString( "onclick_l", std::string( (const char*)prop ) );
prop = (char*) xmlGetProp( cur, BAD_CAST "ondblclick_l" ); prop = (char*) xmlGetProp( cur, BAD_CAST "ondblclick_l" );
if( prop != NULL ) if (prop)
mapAHString( "ondblclick_l", std::string( (const char*)prop ) ); mapAHString( "ondblclick_l", std::string( (const char*)prop ) );
prop = (char*) xmlGetProp( cur, BAD_CAST "onclick_r" ); prop = (char*) xmlGetProp( cur, BAD_CAST "onclick_r" );
if( prop != NULL ) if (prop)
mapAHString( "onclick_r", std::string( (const char*)prop ) ); mapAHString( "onclick_r", std::string( (const char*)prop ) );
prop = (char*) xmlGetProp( cur, BAD_CAST "onlongclick_l" ); prop = (char*) xmlGetProp( cur, BAD_CAST "onlongclick_l" );
if( prop != NULL ) if (prop)
mapAHString( "onlongclick_l", std::string( (const char*)prop ) ); mapAHString( "onlongclick_l", std::string( (const char*)prop ) );
prop = (char*) xmlGetProp( cur, BAD_CAST "onclock_tick" ); prop = (char*) xmlGetProp( cur, BAD_CAST "onclock_tick" );
if( prop != NULL ) if (prop)
mapAHString( "onclock_tick", std::string( (const char*)prop ) ); mapAHString( "onclock_tick", std::string( (const char*)prop ) );
} }

View file

@ -540,7 +540,7 @@ namespace NLGUI
if( editorMode ) if( editorMode )
{ {
prop = (char*) xmlGetProp( cur, BAD_CAST "onenter" ); prop = (char*) xmlGetProp( cur, BAD_CAST "onenter" );
if( prop != NULL ) if (prop)
mapAHString( "onenter", std::string( (const char*)prop ) ); mapAHString( "onenter", std::string( (const char*)prop ) );
} }

View file

@ -244,29 +244,29 @@ namespace NLGUI
// read modal option // read modal option
CXMLAutoPtr prop; CXMLAutoPtr prop;
prop = xmlGetProp (cur, (xmlChar*)"mouse_pos"); prop = xmlGetProp (cur, (xmlChar*)"mouse_pos");
if ( prop ) SpawnOnMousePos= convertBool(prop); if (prop) SpawnOnMousePos= convertBool(prop);
prop = xmlGetProp (cur, (xmlChar*)"exit_click_out"); prop = xmlGetProp (cur, (xmlChar*)"exit_click_out");
if ( prop ) ExitClickOut= convertBool(prop); if (prop) ExitClickOut= convertBool(prop);
prop = xmlGetProp (cur, (xmlChar*)"exit_click_l"); prop = xmlGetProp (cur, (xmlChar*)"exit_click_l");
if ( prop ) ExitClickL= convertBool(prop); if (prop) ExitClickL= convertBool(prop);
prop = xmlGetProp (cur, (xmlChar*)"exit_click_r"); prop = xmlGetProp (cur, (xmlChar*)"exit_click_r");
if ( prop ) ExitClickR= convertBool(prop); if (prop) ExitClickR= convertBool(prop);
prop = xmlGetProp (cur, (xmlChar*)"exit_click_b"); prop = xmlGetProp (cur, (xmlChar*)"exit_click_b");
if ( prop ) ExitClickR= ExitClickL= convertBool(prop); if (prop) ExitClickR= ExitClickL= convertBool(prop);
prop = xmlGetProp (cur, (xmlChar*)"force_inside_screen"); prop = xmlGetProp (cur, (xmlChar*)"force_inside_screen");
if ( prop ) ForceInsideScreen= convertBool(prop); if (prop) ForceInsideScreen= convertBool(prop);
prop = xmlGetProp (cur, (xmlChar*)"category"); prop = xmlGetProp (cur, (xmlChar*)"category");
if ( prop ) Category= (const char *) prop; if (prop) Category= (const char *) prop;
prop = xmlGetProp (cur, (xmlChar*)"onclick_out"); prop = xmlGetProp (cur, (xmlChar*)"onclick_out");
if ( prop ) OnClickOut = (const char *) prop; if (prop) OnClickOut = (const char *) prop;
prop = xmlGetProp (cur, (xmlChar*)"onclick_out_params"); prop = xmlGetProp (cur, (xmlChar*)"onclick_out_params");
if ( prop ) OnClickOutParams = (const char *) prop; if (prop) OnClickOutParams = (const char *) prop;
prop = xmlGetProp (cur, (xmlChar*)"onpostclick_out"); prop = xmlGetProp (cur, (xmlChar*)"onpostclick_out");
if ( prop ) OnPostClickOut = (const char *) prop; if (prop) OnPostClickOut = (const char *) prop;
prop = xmlGetProp (cur, (xmlChar*)"onpostclick_out_params"); prop = xmlGetProp (cur, (xmlChar*)"onpostclick_out_params");
if ( prop ) OnPostClickOutParams = (const char *) prop; if (prop) OnPostClickOutParams = (const char *) prop;
prop = xmlGetProp (cur, (xmlChar*)"exit_key_pushed"); prop = xmlGetProp (cur, (xmlChar*)"exit_key_pushed");
if ( prop ) ExitKeyPushed= convertBool(prop); if (prop) ExitKeyPushed= convertBool(prop);
// Force parent hotspot for spawn on mouse // Force parent hotspot for spawn on mouse
if(SpawnOnMousePos) if(SpawnOnMousePos)

View file

@ -47,8 +47,8 @@ void CHairSet::init (NLMISC::IProgressCallback &progress)
const CItemSheet *item = SheetMngr.getItem(SLOTTYPE::HEAD_SLOT, k); const CItemSheet *item = SheetMngr.getItem(SLOTTYPE::HEAD_SLOT, k);
if( (item) && (!item->getShape().empty()) ) if( (item) && (!item->getShape().empty()) )
{ {
std::string itemName = item->getShape(); std::string itemName = NLMISC::toLower(item->getShape());
itemName = NLMISC::strlwr(itemName);
if (item->getShape().find("cheveux", 0) != std::string::npos) if (item->getShape().find("cheveux", 0) != std::string::npos)
{ {
// get race // get race

View file

@ -257,7 +257,7 @@ void CAnimalPositionState::serial(NLMISC::IStream &f)
// *************************************************************************** // ***************************************************************************
CEntityCL *CNamedEntityPositionState::getEntity() CEntityCL *CNamedEntityPositionState::getEntity()
{ {
if (!dbOk()) return false; if (!dbOk()) return NULL;
return EntitiesMngr.getEntityByName(_Name->getValue32()); return EntitiesMngr.getEntityByName(_Name->getValue32());
} }

View file

@ -110,7 +110,7 @@ bool CDBGroupListSheet::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
// value // value
prop = xmlGetProp (cur, (xmlChar*)"value"); prop = xmlGetProp (cur, (xmlChar*)"value");
if ( prop ) if (prop)
{ {
// get a branch in the database. // get a branch in the database.
CCDBNodeBranch *branch= NLGUI::CDBManager::getInstance()->getDbBranch(prop); CCDBNodeBranch *branch= NLGUI::CDBManager::getInstance()->getDbBranch(prop);

View file

@ -94,7 +94,7 @@ bool CDBGroupListSheetText::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
// value // value
prop = xmlGetProp (cur, (xmlChar*)"value"); prop = xmlGetProp (cur, (xmlChar*)"value");
if ( prop ) if (prop)
{ {
// get a branch in the database. // get a branch in the database.
CCDBNodeBranch *branch= NLGUI::CDBManager::getInstance()->getDbBranch(prop); CCDBNodeBranch *branch= NLGUI::CDBManager::getInstance()->getDbBranch(prop);