mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Merge pull request #1490 from disarray2077/patch-9
Improve ConvertTo Variant
This commit is contained in:
commit
fa152a0084
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue