diff --git a/src/Core/Resource/Script/CScriptLayer.h b/src/Core/Resource/Script/CScriptLayer.h index 57a29923..c424c9b8 100644 --- a/src/Core/Resource/Script/CScriptLayer.h +++ b/src/Core/Resource/Script/CScriptLayer.h @@ -27,9 +27,9 @@ public: } // Data Manipulation - void AddInstance(CScriptObject *pObject, uint32 Index = -1) + void AddInstance(CScriptObject *pObject, uint32 Index = UINT32_MAX) { - if (Index != -1 && Index < mInstances.size()) + if (Index != UINT32_MAX && Index < mInstances.size()) { auto it = mInstances.begin(); std::advance(it, Index); diff --git a/src/Core/ScriptExtra/CScriptExtra.h b/src/Core/ScriptExtra/CScriptExtra.h index 9eb08c79..a24a94b5 100644 --- a/src/Core/ScriptExtra/CScriptExtra.h +++ b/src/Core/ScriptExtra/CScriptExtra.h @@ -27,7 +27,7 @@ protected: public: explicit CScriptExtra(CScriptObject *pInstance, CScene *pScene, CScriptNode *pParent = nullptr) - : CSceneNode(pScene, -1, pParent) + : CSceneNode(pScene, UINT32_MAX, pParent) , mpScriptNode(pParent) , mpInstance(pInstance) , mGame(pInstance->Template()->Game())