mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2026-06-13 21:37:11 +02:00
Update sqratTypes.h
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user