グラフィック系を大幅に高速化,16,2進数リテラルの実�
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user