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:
parent
9298065cef
commit
237683e6ce
@ -45,7 +45,7 @@ struct popAsInt
|
||||
T value;
|
||||
popAsInt(HSQUIRRELVM vm, SQInteger idx)
|
||||
{
|
||||
SQObjectType value_type = sq_gettype(vm, idx);
|
||||
const SQObjectType value_type = sq_gettype(vm, idx);
|
||||
switch(value_type) {
|
||||
case OT_BOOL:
|
||||
SQBool sqValueb;
|
||||
@ -60,7 +60,7 @@ struct popAsInt
|
||||
case OT_FLOAT:
|
||||
SQFloat sqValuef;
|
||||
sq_getfloat(vm, idx, &sqValuef);
|
||||
value = static_cast<T>(static_cast<int>(sqValuef));
|
||||
value = static_cast<T>(static_cast<SQInteger>(sqValuef));
|
||||
break;
|
||||
default:
|
||||
SQTHROW(vm, FormatTypeError(vm, idx, _SC("integer")));
|
||||
@ -86,7 +86,7 @@ struct popAsFloat
|
||||
T value;
|
||||
popAsFloat(HSQUIRRELVM vm, SQInteger idx)
|
||||
{
|
||||
SQObjectType value_type = sq_gettype(vm, idx);
|
||||
const SQObjectType value_type = sq_gettype(vm, idx);
|
||||
switch(value_type) {
|
||||
case OT_BOOL:
|
||||
SQBool sqValueb;
|
||||
|
Loading…
Reference in New Issue
Block a user