From 89be3e39dee8ecbe268ecabf330c5a09aed302ac Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 19 Mar 2016 19:29:03 +0100 Subject: [PATCH] Fixed: Clang warnings --HG-- branch : develop --- code/nel/include/nel/gui/ctrl_button.h | 2 +- code/nel/include/nel/gui/ctrl_text_button.h | 2 +- code/nel/include/nel/gui/dbgroup_combo_box.h | 2 +- code/nel/src/gui/dbgroup_combo_box.cpp | 2 +- .../src/interface_v3/interface_3d_scene.cpp | 22 +++++++++---------- .../src/interface_v3/interface_3d_scene.h | 12 +++++----- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/code/nel/include/nel/gui/ctrl_button.h b/code/nel/include/nel/gui/ctrl_button.h index 02b827329..1910ea72a 100644 --- a/code/nel/include/nel/gui/ctrl_button.h +++ b/code/nel/include/nel/gui/ctrl_button.h @@ -51,7 +51,7 @@ namespace NLGUI xmlNodePtr serialize( xmlNodePtr parentNode, const char *type ) const; // Init part - virtual bool parse (xmlNodePtr cur,CInterfaceGroup * parentGroup); + virtual bool parse (xmlNodePtr cur, CInterfaceGroup * parentGroup); virtual void updateCoords(); diff --git a/code/nel/include/nel/gui/ctrl_text_button.h b/code/nel/include/nel/gui/ctrl_text_button.h index 4f5251a8b..69898639d 100644 --- a/code/nel/include/nel/gui/ctrl_text_button.h +++ b/code/nel/include/nel/gui/ctrl_text_button.h @@ -49,7 +49,7 @@ namespace NLGUI xmlNodePtr serialize( xmlNodePtr parentNode, const char *type ) const; // Init part - virtual bool parse (xmlNodePtr cur,CInterfaceGroup * parentGroup); + virtual bool parse (xmlNodePtr cur, CInterfaceGroup * parentGroup); virtual void checkCoords(); virtual void updateCoords(); diff --git a/code/nel/include/nel/gui/dbgroup_combo_box.h b/code/nel/include/nel/gui/dbgroup_combo_box.h index 1aac8bb1f..87e6d758a 100644 --- a/code/nel/include/nel/gui/dbgroup_combo_box.h +++ b/code/nel/include/nel/gui/dbgroup_combo_box.h @@ -64,7 +64,7 @@ namespace NLGUI uint getTextPos(uint nId) const; const ucstring &getTexture(uint i) const; void setGrayed(uint i, bool g); - const bool getGrayed(uint i) const; + bool getGrayed(uint i) const; void removeText(uint nPos); uint getNumTexts() const {return (uint)_Texts.size();} void sortText(); diff --git a/code/nel/src/gui/dbgroup_combo_box.cpp b/code/nel/src/gui/dbgroup_combo_box.cpp index 572d69ad4..184829e4c 100644 --- a/code/nel/src/gui/dbgroup_combo_box.cpp +++ b/code/nel/src/gui/dbgroup_combo_box.cpp @@ -321,7 +321,7 @@ namespace NLGUI } // *************************************************************************** - const bool CDBGroupComboBox::getGrayed(uint i) const + bool CDBGroupComboBox::getGrayed(uint i) const { if(i<_Grayed.size()) return _Grayed[i]; diff --git a/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp b/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp index d7fec407b..bb15d8d4b 100644 --- a/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp +++ b/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp @@ -786,7 +786,7 @@ CInterface3DCharacter::~CInterface3DCharacter() } // ---------------------------------------------------------------------------- -bool CInterface3DCharacter::parse (xmlNodePtr cur, CInterface3DScene *parentGroup) +bool CInterface3DCharacter::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) { if (!CInterfaceElement::parse(cur, parentGroup)) return false; @@ -808,7 +808,7 @@ bool CInterface3DCharacter::parse (xmlNodePtr cur, CInterface3DScene *parentGrou _Char3D = new CCharacter3D; _Char3D->copyAnimation(copyAnim); - _Char3D->init (parentGroup->getScene()); + _Char3D->init (dynamic_cast(parentGroup)->getScene()); _Char3D->setPos (pos.x, pos.y, pos.z); _Char3D->setRotEuler ( rot.x * ((float)(NLMISC::Pi / 180)), rot.y * ((float)(NLMISC::Pi / 180)), @@ -1073,7 +1073,7 @@ CInterface3DIG::~CInterface3DIG() } // ---------------------------------------------------------------------------- -bool CInterface3DIG::parse (xmlNodePtr cur, CInterface3DScene *parentGroup) +bool CInterface3DIG::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) { if (!CInterfaceElement::parse(cur, parentGroup)) return false; @@ -1095,8 +1095,8 @@ bool CInterface3DIG::parse (xmlNodePtr cur, CInterface3DScene *parentGroup) setRotX (_Rot.x); setRotY (_Rot.y); setRotZ (_Rot.z); - _IG->addToScene (*parentGroup->getScene(), CViewRenderer::getInstance()->getDriver() ); - parentGroup->getScene()->setToGlobalInstanceGroup (_IG); + _IG->addToScene (*dynamic_cast(parentGroup)->getScene(), CViewRenderer::getInstance()->getDriver() ); + dynamic_cast(parentGroup)->getScene()->setToGlobalInstanceGroup (_IG); return true; } @@ -1235,7 +1235,7 @@ CInterface3DShape::~CInterface3DShape() } // ---------------------------------------------------------------------------- -bool CInterface3DShape::parse (xmlNodePtr cur, CInterface3DScene *parentGroup) +bool CInterface3DShape::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) { if (!CInterfaceElement::parse(cur, parentGroup)) return false; @@ -1249,7 +1249,7 @@ bool CInterface3DShape::parse (xmlNodePtr cur, CInterface3DScene *parentGroup) ptr = xmlGetProp (cur, (xmlChar*)"name"); if (ptr) _Name = toLower((const char*)ptr); - _Instance = parentGroup->getScene()->createInstance(_Name); + _Instance = dynamic_cast(parentGroup)->getScene()->createInstance(_Name); if (_Instance.empty()) return false; @@ -1385,7 +1385,7 @@ void CInterface3DShape::setName (const std::string &ht) // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- -bool CInterface3DCamera::parse (xmlNodePtr cur, CInterface3DScene *parentGroup) +bool CInterface3DCamera::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) { if (!CInterfaceElement::parse(cur, parentGroup)) return false; @@ -1422,12 +1422,12 @@ CInterface3DLight::~CInterface3DLight() } // ---------------------------------------------------------------------------- -bool CInterface3DLight::parse (xmlNodePtr cur, CInterface3DScene *parentGroup) +bool CInterface3DLight::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) { if (!CInterfaceElement::parse(cur, parentGroup)) return false; - _Light = parentGroup->getScene()->createPointLight(); + _Light = dynamic_cast(parentGroup)->getScene()->createPointLight(); CXMLAutoPtr ptr((const char*)xmlGetProp (cur, (xmlChar*)"pos")); if (ptr) _Pos = convertVector(ptr); @@ -1514,7 +1514,7 @@ CInterface3DFX::~CInterface3DFX() } // ---------------------------------------------------------------------------- -bool CInterface3DFX::parse (xmlNodePtr cur, CInterface3DScene *parentGroup) +bool CInterface3DFX::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) { if (!CInterfaceElement::parse(cur, parentGroup)) return false; diff --git a/code/ryzom/client/src/interface_v3/interface_3d_scene.h b/code/ryzom/client/src/interface_v3/interface_3d_scene.h index cabfb0184..5343390c8 100644 --- a/code/ryzom/client/src/interface_v3/interface_3d_scene.h +++ b/code/ryzom/client/src/interface_v3/interface_3d_scene.h @@ -148,7 +148,7 @@ public: CInterface3DCharacter(); virtual ~CInterface3DCharacter(); - virtual bool parse (xmlNodePtr cur, CInterface3DScene *parentGroup); + virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup); virtual void checkCoords(); @@ -236,7 +236,7 @@ public: virtual ~CInterface3DShape(); - virtual bool parse (xmlNodePtr cur, CInterface3DScene *parentGroup); + virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup); NL3D::UInstance getShape() { return _Instance; } @@ -295,7 +295,7 @@ public: virtual ~CInterface3DIG(); - virtual bool parse (xmlNodePtr cur, CInterface3DScene *parentGroup); + virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup); NL3D::UInstanceGroup *getIG() { return _IG; } @@ -357,7 +357,7 @@ public: _Dist = 0; } - virtual bool parse (xmlNodePtr cur, CInterface3DScene *parentGroup); + virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup); float getFOV() { return _FOV; } NLMISC::CVector getPos() { return _Pos; } NLMISC::CVector getTarget() { return _Target; } @@ -436,7 +436,7 @@ public: virtual ~CInterface3DLight(); - virtual bool parse (xmlNodePtr cur, CInterface3DScene *parentGroup); + virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup); float getPosX() const { return _Pos.x; } float getPosY() const { return _Pos.y; } @@ -498,7 +498,7 @@ public: virtual ~CInterface3DFX(); - virtual bool parse (xmlNodePtr cur, CInterface3DScene *parentGroup); + virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup); virtual void checkCoords();