From 26370c962d155168e343c4a8a419191b025fb395 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 22 Sep 2013 13:20:19 +0200 Subject: [PATCH] Fixed: Warnings with GCC --- code/nel/src/gui/group_container.cpp | 16 ++++++++-------- code/nel/src/gui/group_wheel.cpp | 4 ++-- code/nel/src/gui/interface_group.cpp | 12 ++++++------ code/nel/src/gui/interface_parser.cpp | 8 ++++---- code/ryzom/client/src/fx_manager.h | 2 +- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/code/nel/src/gui/group_container.cpp b/code/nel/src/gui/group_container.cpp index 9cb31deab..c3a7834c5 100644 --- a/code/nel/src/gui/group_container.cpp +++ b/code/nel/src/gui/group_container.cpp @@ -2233,35 +2233,35 @@ namespace NLGUI if( editorMode ) { ptr = xmlGetProp( cur, BAD_CAST "on_open" ); - if( ptr != NULL ) + if( ptr ) mapAHString( "on_open", std::string( (const char*)ptr ) ); ptr = xmlGetProp( cur, BAD_CAST "on_close" ); - if( ptr != NULL ) + if( ptr ) mapAHString( "on_close", std::string( (const char*)ptr ) ); ptr = xmlGetProp( cur, BAD_CAST "on_close_button" ); - if( ptr != NULL ) + if( ptr ) mapAHString( "on_close_button", std::string( (const char*)ptr ) ); ptr = xmlGetProp( cur, BAD_CAST "on_move" ); - if( ptr != NULL ) + if( ptr ) mapAHString( "on_move", std::string( (const char*)ptr ) ); ptr = xmlGetProp( cur, BAD_CAST "on_deactive_check" ); - if( ptr != NULL ) + if( ptr ) mapAHString( "on_deactive_check", std::string( (const char*)ptr ) ); ptr = xmlGetProp( cur, BAD_CAST "on_resize" ); - if( ptr != NULL ) + if( ptr ) mapAHString( "on_resize", std::string( (const char*)ptr ) ); ptr = xmlGetProp( cur, BAD_CAST "on_alpha_settings_changed" ); - if( ptr != NULL ) + if( ptr ) mapAHString( "on_alpha_settings_changed", std::string( (const char*)ptr ) ); ptr = xmlGetProp( cur, BAD_CAST "on_begin_move" ); - if( ptr != NULL ) + if( ptr ) mapAHString( "on_begin_move", std::string( (const char*)ptr ) ); } diff --git a/code/nel/src/gui/group_wheel.cpp b/code/nel/src/gui/group_wheel.cpp index 59172382e..6f4c96484 100644 --- a/code/nel/src/gui/group_wheel.cpp +++ b/code/nel/src/gui/group_wheel.cpp @@ -119,11 +119,11 @@ namespace NLGUI if( editorMode ) { CXMLAutoPtr ptr( (char*) xmlGetProp( cur, BAD_CAST "on_wheel_up" ) ); - if( ptr != NULL ) + if( ptr ) mapAHString( "on_wheel_up", std::string( (const char*)ptr ) ); ptr = (char*) xmlGetProp( cur, BAD_CAST "on_wheel_down" ); - if( ptr != NULL ) + if( ptr ) mapAHString( "on_wheel_down", std::string( (const char*)ptr ) ); } diff --git a/code/nel/src/gui/interface_group.cpp b/code/nel/src/gui/interface_group.cpp index 4e8919e5c..b2de26527 100644 --- a/code/nel/src/gui/interface_group.cpp +++ b/code/nel/src/gui/interface_group.cpp @@ -349,27 +349,27 @@ namespace NLGUI if( editorMode ) { ptr = (char*) xmlGetProp( cur, BAD_CAST "on_active" ); - if( ptr != NULL ) + if( ptr ) mapAHString( "on_active", std::string( (const char*)ptr ) ); ptr = (char*) xmlGetProp( cur, BAD_CAST "on_deactive" ); - if( ptr != NULL ) + if( ptr ) mapAHString( "on_deactive", std::string( (const char*)ptr ) ); ptr = (char*) xmlGetProp( cur, BAD_CAST "group_onclick_r" ); - if( ptr != NULL ) + if( ptr ) mapAHString( "group_onclick_r", std::string( (const char*)ptr ) ); ptr = (char*) xmlGetProp( cur, BAD_CAST "group_onclick_l" ); - if( ptr != NULL ) + if( ptr ) mapAHString( "group_onclick_l", std::string( (const char*)ptr ) ); ptr = (char*) xmlGetProp( cur, BAD_CAST "on_enter" ); - if( ptr != NULL ) + if( ptr ) mapAHString( "on_enter", std::string( (const char*)ptr ) ); ptr = (char*) xmlGetProp( cur, BAD_CAST "on_escape" ); - if( ptr != NULL ) + if( ptr ) mapAHString( "on_escape", std::string( (const char*)ptr ) ); } diff --git a/code/nel/src/gui/interface_parser.cpp b/code/nel/src/gui/interface_parser.cpp index c99feb35f..01e47bb80 100644 --- a/code/nel/src/gui/interface_parser.cpp +++ b/code/nel/src/gui/interface_parser.cpp @@ -1001,7 +1001,7 @@ namespace NLGUI ptr = (char*) xmlGetProp (cur, (xmlChar*)"target"); std::string target; - if( ptr != NULL ) + if( ptr ) { target = std::string( (const char*)ptr ); if( !editorMode ) @@ -1136,17 +1136,17 @@ namespace NLGUI VariableData data; ptr = xmlGetProp( cur, BAD_CAST "entry" ); - if( ptr != NULL ) + if( ptr ) data.entry = std::string( (const char*)ptr ); data.type = type; ptr = xmlGetProp( cur, BAD_CAST "value" ); - if( ptr != NULL ) + if( ptr ) data.value = std::string( (const char*)ptr ); ptr = xmlGetProp( cur, BAD_CAST "size" ); - if( ptr != NULL ) + if( ptr ) fromString( std::string( (const char*)ptr ), data.size ); variableCache[ data.entry ] = data; diff --git a/code/ryzom/client/src/fx_manager.h b/code/ryzom/client/src/fx_manager.h index 71df3f2c4..e41171e9e 100644 --- a/code/ryzom/client/src/fx_manager.h +++ b/code/ryzom/client/src/fx_manager.h @@ -77,7 +77,7 @@ protected: float TimeOut; bool TestNoMoreParticles; public: - CFX2Remove(NL3D::UParticleSystemInstance instance=NL3D::UParticleSystemInstance(), float timeOut = NULL, bool testNoMoreParticles = false) + CFX2Remove(NL3D::UParticleSystemInstance instance=NL3D::UParticleSystemInstance(), float timeOut = 0.f, bool testNoMoreParticles = false) { Instance = instance; TimeOut = timeOut;