parse can't take rvalue slices as it uses ref
This commit is contained in:
parent
36a7d7087f
commit
aedc2f0c7a
|
@ -428,11 +428,11 @@ long constructLong(ref Node node)
|
||||||
//Zero.
|
//Zero.
|
||||||
if(value == "0") {result = cast(long)0;}
|
if(value == "0") {result = cast(long)0;}
|
||||||
//Binary.
|
//Binary.
|
||||||
else if(value.startsWith("0b")){result = sign * parse!int(value[2 .. $], 2);}
|
else if(value.startsWith("0b")){result = sign * to!int(value[2 .. $], 2);}
|
||||||
//Hexadecimal.
|
//Hexadecimal.
|
||||||
else if(value.startsWith("0x")){result = sign * parse!int(value[2 .. $], 16);}
|
else if(value.startsWith("0x")){result = sign * to!int(value[2 .. $], 16);}
|
||||||
//Octal.
|
//Octal.
|
||||||
else if(value[0] == '0') {result = sign * parse!int(value, 8);}
|
else if(value[0] == '0') {result = sign * to!int(value, 8);}
|
||||||
//Sexagesimal.
|
//Sexagesimal.
|
||||||
else if(value.canFind(":"))
|
else if(value.canFind(":"))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue