1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-19 00:20:25 +02:00

Improve ConvertTo Variant

This commit is contained in:
disarray2077 2022-03-04 11:42:10 -03:00 committed by GitHub
parent 1223395a01
commit e4e5933ec9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -94,6 +94,9 @@ namespace System.Reflection
int64 intVal = ToInt64(variant);
switch (type.[Friend]mTypeCode)
{
case .Boolean:
bool val = intVal != 0;
return Variant.Create(type, &val);
case .Float:
float val = (.)intVal;
return Variant.Create(type, &val);