From 31a1de91917e02236398d42b09f150c4da75dd3d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 18 Jun 2020 06:50:17 -0400 Subject: [PATCH] CScriptExtra: Eliminate sign conversion warnings --- src/Core/Resource/Script/CScriptLayer.h | 4 ++-- src/Core/ScriptExtra/CScriptExtra.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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())