グラフィック系を大幅に高速化,16,2進数リテラルの実�

This commit is contained in:
otya128 committed 2015-08-23 20:37:56 +09:00
1 parent e57782ea3d
commit 0a52b51371
7 files changed
+185 -48

No files matched your search

+1 -6
View File
@@ -368,18 +368,13 @@ class BuiltinFunction
static wstring HEX(int val, DefaultValue!(int, false) digits)
{
import std.format;
if(digits.isDefault)
{
//ひどい
return val.to!string(16).to!wstring;
}
if(digits > 8)
{
throw new OutOfRange();
}
FormatSpec!char f;
f.spec = 'X';
f.flZero = true;
f.flZero = !digits.isDefault;
f.width = cast(int)digits;
auto w = appender!wstring();
formatValue(w, val, f);