LiveAPI: always set POD stack var if loop has ran, don't check it

No point checking on this, removes an extra instruction.
This commit is contained in:
Kawe Mazidjatari 2024-11-18 01:36:32 +01:00
parent 9b2034d897
commit 745024d198

View File

@ -337,7 +337,6 @@ static bool LiveAPI_SetPlayerIdentityFields(HSQUIRRELVM const v, const SQTable*
if (sq_isnull(node.key))
continue;
if (!ranLoop)
ranLoop = true;
if (!LiveAPI_CheckSwitchType(v, node.key))
@ -468,7 +467,6 @@ static bool LiveAPI_SetInventoryItem(HSQUIRRELVM const v, const SQTable* const t
if (sq_isnull(node.key))
continue;
if (!ranLoop)
ranLoop = true;
if (!LiveAPI_CheckSwitchType(v, node.key))
@ -1723,7 +1721,6 @@ static bool LiveAPI_SetCustomArrayFields(HSQUIRRELVM const v, google::protobuf::
if (sq_isnull(valueObj))
continue;
if (!ranLoop)
ranLoop = true;
const SQObjectType valueType = sq_type(valueObj);