mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-05-31 09:21:36 +00:00
Added support for default values of arguments with uint type
This commit is contained in:
parent
9b61ee9618
commit
81bc05b7c5
3 changed files with 6 additions and 4 deletions
|
@ -924,11 +924,11 @@ void FxBoolCast::EmitCompare(VMFunctionBuilder *build, bool invert, TArray<size_
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
FxIntCast::FxIntCast(FxExpression *x, bool nowarn, bool explicitly)
|
||||
FxIntCast::FxIntCast(FxExpression *x, bool nowarn, bool explicitly, bool isunsigned)
|
||||
: FxExpression(EFX_IntCast, x->ScriptPosition)
|
||||
{
|
||||
basex=x;
|
||||
ValueType = TypeSInt32;
|
||||
ValueType = isunsigned ? TypeUInt32 : TypeSInt32;
|
||||
NoWarn = nowarn;
|
||||
Explicit = explicitly;
|
||||
}
|
||||
|
@ -1632,7 +1632,7 @@ FxExpression *FxTypeCast::Resolve(FCompileContext &ctx)
|
|||
else if (ValueType->isInt())
|
||||
{
|
||||
// This is only for casting to actual ints. Subtypes representing an int will be handled elsewhere.
|
||||
FxExpression *x = new FxIntCast(basex, NoWarn, Explicit);
|
||||
FxExpression *x = new FxIntCast(basex, NoWarn, Explicit, static_cast<PInt*>(ValueType)->Unsigned);
|
||||
x = x->Resolve(ctx);
|
||||
basex = nullptr;
|
||||
delete this;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue