mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-25 16:46:17 +00:00
Changed: #825 Remove all warnings when compiling Ryzom
This commit is contained in:
parent
352f937243
commit
0a142b0aed
4 changed files with 22 additions and 7 deletions
|
@ -2197,8 +2197,8 @@ bool CInterfaceParser::parseTree (xmlNodePtr cur, SMasterGroup *parentGroup)
|
|||
for (uint32 j = 0; j < rMG.Group->getGroups().size(); ++j)
|
||||
{
|
||||
CInterfaceGroup *pIG = rMG.Group->getGroups()[j];
|
||||
string stmp = strlwr(pIG->getId().substr(pIG->getId().rfind(':')+1,pIG->getId().size()));
|
||||
string stmp2 = strlwr(string((const char*)ptr));
|
||||
string stmp = NLMISC::toLower(pIG->getId().substr(pIG->getId().rfind(':')+1,pIG->getId().size()));
|
||||
string stmp2 = NLMISC::toLower(string((const char*)ptr));
|
||||
if (stmp == stmp2)
|
||||
{
|
||||
pEltFound = pIG;
|
||||
|
|
|
@ -22,6 +22,12 @@
|
|||
namespace R2
|
||||
{
|
||||
|
||||
// *********************************************************************************************************
|
||||
CDisplayerLua::CDisplayerLua()
|
||||
{
|
||||
_ToLua._Displayer = this;
|
||||
}
|
||||
|
||||
// *********************************************************************************************************
|
||||
bool CDisplayerLua::init(const CLuaObject ¶meters)
|
||||
{
|
||||
|
@ -53,9 +59,14 @@ bool CDisplayerLua::init(const CLuaObject ¶meters)
|
|||
}
|
||||
|
||||
// *********************************************************************************************************
|
||||
CDisplayerLua &CDisplayerLua::CToLua::getEnclosing()
|
||||
CDisplayerLua::CToLua::CToLua():_Displayer(NULL)
|
||||
{
|
||||
return *(CDisplayerLua *) ((uint8 *) this - offsetof(CDisplayerLua, _ToLua)); // ugly, yes ...
|
||||
}
|
||||
|
||||
// *********************************************************************************************************
|
||||
CDisplayerLua* CDisplayerLua::CToLua::getEnclosing()
|
||||
{
|
||||
return _Displayer;
|
||||
}
|
||||
|
||||
// *********************************************************************************************************
|
||||
|
@ -79,7 +90,8 @@ void CDisplayerLua::CToLua::executeHandler(const CLuaString &eventName, int numA
|
|||
ls.insert(- numArgs - 1);
|
||||
if (dumpStackWanted) ls.dumpStack();
|
||||
// First arg always is the instance being displayed
|
||||
getEnclosing().getDisplayedInstance()->getLuaProjection().push();
|
||||
if (getEnclosing())
|
||||
getEnclosing()->getDisplayedInstance()->getLuaProjection().push();
|
||||
ls.insert(- numArgs - 1);
|
||||
if (dumpStackWanted) ls.dumpStack();
|
||||
CLuaIHM::executeFunctionOnStack(*_LuaTable.getLuaState(), numArgs + 2, 0);
|
||||
|
|
|
@ -28,6 +28,7 @@ class CDisplayerLua : public CDisplayerBase
|
|||
{
|
||||
public:
|
||||
NLMISC_DECLARE_CLASS(R2::CDisplayerLua);
|
||||
CDisplayerLua();
|
||||
// expected parameter is a ctor function
|
||||
virtual bool init(const CLuaObject ¶meters);
|
||||
virtual void pushLuaAccess(CLuaState &ls);
|
||||
|
@ -55,11 +56,13 @@ private:
|
|||
class CToLua : public CLuaEventForwarder
|
||||
{
|
||||
public:
|
||||
CToLua();
|
||||
CLuaObject _LuaTable; // reference to lua version of the displayer
|
||||
CDisplayerLua *_Displayer;
|
||||
virtual CLuaState *getLua();
|
||||
virtual void executeHandler(const CLuaString &eventName, int numArgs);
|
||||
void pushLuaAccess(CLuaState &ls);
|
||||
CDisplayerLua &getEnclosing();
|
||||
CDisplayerLua* getEnclosing();
|
||||
};
|
||||
friend class CToLua;
|
||||
CToLua _ToLua;
|
||||
|
|
|
@ -1856,7 +1856,7 @@ CInstanceObserverLua::~CInstanceObserverLua()
|
|||
#ifdef NL_DEBUG
|
||||
nlassert(!getEditor().isInstanceObserver(this));
|
||||
#endif
|
||||
nlassert(_Count >= 0);
|
||||
nlassert(_Count < 1000000000);
|
||||
-- _Count;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue