Fixed: Clang warnings

This commit is contained in:
kervala 2016-03-19 19:29:03 +01:00
parent a9c06ce8d0
commit 17b390e589
6 changed files with 21 additions and 21 deletions

View file

@ -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();

View file

@ -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];

View file

@ -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<CInterface3DScene*>(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<CInterface3DScene*>(parentGroup)->getScene(), CViewRenderer::getInstance()->getDriver() );
dynamic_cast<CInterface3DScene*>(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<CInterface3DScene*>(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<CInterface3DScene*>(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;

View file

@ -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();