1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00

Update sqratTypes.h

This commit is contained in:
Sandu Liviu Catalin 2023-08-06 21:32:04 +03:00
parent 9298065cef
commit 237683e6ce

View File

@ -45,7 +45,7 @@ struct popAsInt
T value; T value;
popAsInt(HSQUIRRELVM vm, SQInteger idx) popAsInt(HSQUIRRELVM vm, SQInteger idx)
{ {
SQObjectType value_type = sq_gettype(vm, idx); const SQObjectType value_type = sq_gettype(vm, idx);
switch(value_type) { switch(value_type) {
case OT_BOOL: case OT_BOOL:
SQBool sqValueb; SQBool sqValueb;
@ -60,7 +60,7 @@ struct popAsInt
case OT_FLOAT: case OT_FLOAT:
SQFloat sqValuef; SQFloat sqValuef;
sq_getfloat(vm, idx, &sqValuef); sq_getfloat(vm, idx, &sqValuef);
value = static_cast<T>(static_cast<int>(sqValuef)); value = static_cast<T>(static_cast<SQInteger>(sqValuef));
break; break;
default: default:
SQTHROW(vm, FormatTypeError(vm, idx, _SC("integer"))); SQTHROW(vm, FormatTypeError(vm, idx, _SC("integer")));
@ -86,7 +86,7 @@ struct popAsFloat
T value; T value;
popAsFloat(HSQUIRRELVM vm, SQInteger idx) popAsFloat(HSQUIRRELVM vm, SQInteger idx)
{ {
SQObjectType value_type = sq_gettype(vm, idx); const SQObjectType value_type = sq_gettype(vm, idx);
switch(value_type) { switch(value_type) {
case OT_BOOL: case OT_BOOL:
SQBool sqValueb; SQBool sqValueb;