mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-13 05:44:11 +02:00
support printing bool and char in theory
This commit is contained in:
parent
e8cfe1a0a9
commit
6c03b8c8c9
2 changed files with 12 additions and 0 deletions
|
@ -1126,6 +1126,12 @@ namespace System.Reflection
|
||||||
(*(float*)&mValue).ToString(strBuffer);
|
(*(float*)&mValue).ToString(strBuffer);
|
||||||
case typeof(double):
|
case typeof(double):
|
||||||
(*(double*)&mValue).ToString(strBuffer);
|
(*(double*)&mValue).ToString(strBuffer);
|
||||||
|
case typeof (bool):
|
||||||
|
strBuffer.Append((*(bool*)&mValue) ? "true" : "false");
|
||||||
|
case typeof(char8), typeof(char16), typeof(char32):
|
||||||
|
strBuffer.Append('\'');
|
||||||
|
(*(char32*)&mValue).ToString(strBuffer);
|
||||||
|
strBuffer.Append('\'');
|
||||||
case typeof(uint64), typeof(uint):
|
case typeof(uint64), typeof(uint):
|
||||||
(*(uint64*)&mValue).ToString(strBuffer);
|
(*(uint64*)&mValue).ToString(strBuffer);
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -1126,6 +1126,12 @@ namespace System.Reflection
|
||||||
(*(float*)&mValue).ToString(strBuffer);
|
(*(float*)&mValue).ToString(strBuffer);
|
||||||
case typeof(double):
|
case typeof(double):
|
||||||
(*(double*)&mValue).ToString(strBuffer);
|
(*(double*)&mValue).ToString(strBuffer);
|
||||||
|
case typeof (bool):
|
||||||
|
strBuffer.Append((*(bool*)&mValue) ? "true" : "false");
|
||||||
|
case typeof(char8), typeof(char16), typeof(char32):
|
||||||
|
strBuffer.Append('\'');
|
||||||
|
(*(char32*)&mValue).ToString(strBuffer);
|
||||||
|
strBuffer.Append('\'');
|
||||||
case typeof(uint64), typeof(uint):
|
case typeof(uint64), typeof(uint):
|
||||||
(*(uint64*)&mValue).ToString(strBuffer);
|
(*(uint64*)&mValue).ToString(strBuffer);
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue