mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-12 05:14:10 +02:00
Fixed const float generic arg
This commit is contained in:
parent
9a854a0237
commit
8047bebfca
1 changed files with 5 additions and 2 deletions
|
@ -11626,14 +11626,17 @@ BfVariant BfModule::TypedValueToVariant(BfAstNode* refNode, const BfTypedValue&
|
||||||
case BfTypeCode_UIntPtr:
|
case BfTypeCode_UIntPtr:
|
||||||
case BfTypeCode_IntUnknown:
|
case BfTypeCode_IntUnknown:
|
||||||
case BfTypeCode_UIntUnknown:
|
case BfTypeCode_UIntUnknown:
|
||||||
case BfTypeCode_Float:
|
|
||||||
case BfTypeCode_Double:
|
case BfTypeCode_Double:
|
||||||
case BfTypeCode_Char8:
|
case BfTypeCode_Char8:
|
||||||
case BfTypeCode_Char16:
|
case BfTypeCode_Char16:
|
||||||
case BfTypeCode_Char32:
|
case BfTypeCode_Char32:
|
||||||
variant.mTypeCode = constant->mTypeCode;
|
variant.mTypeCode = constant->mTypeCode;
|
||||||
variant.mInt64 = constant->mInt64;
|
variant.mInt64 = constant->mInt64;
|
||||||
break;
|
break;
|
||||||
|
case BfTypeCode_Float:
|
||||||
|
variant.mTypeCode = constant->mTypeCode;
|
||||||
|
variant.mSingle = (float)constant->mDouble;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
if (refNode != NULL)
|
if (refNode != NULL)
|
||||||
Fail("Invalid const expression type", refNode);
|
Fail("Invalid const expression type", refNode);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue