diff --git a/src/object_.d b/src/object_.d index 78b0b231b55..933b01d33e3 100644 --- a/src/object_.d +++ b/src/object_.d @@ -559,7 +559,7 @@ class TypeInfo_StaticArray : TypeInfo override string toString() const { char[20] tmp = void; - return cast(string)(value.toString() ~ "[" ~ tmp.intToString(len) ~ "]"); + return cast(string)(value.toString() ~ "[" ~ tmp.uintToString(len) ~ "]"); } override bool opEquals(Object o) @@ -1375,7 +1375,7 @@ class Throwable : Object if (file) { - buf ~= this.classinfo.name ~ "@" ~ file ~ "(" ~ tmp.intToString(line) ~ ")"; + buf ~= this.classinfo.name ~ "@" ~ file ~ "(" ~ tmp.uintToString(line) ~ ")"; } else { diff --git a/src/rt/arrayassign.d b/src/rt/arrayassign.d index 163e6ec146d..839f484765e 100644 --- a/src/rt/arrayassign.d +++ b/src/rt/arrayassign.d @@ -36,7 +36,7 @@ extern (C) void[] _d_arrayassign(TypeInfo ti, void[] from, void[] to) char[10] tmp1 = void; char[10] tmp2 = void; string msg = "lengths don't match for array copy, "c; - msg ~= tmp1.intToString(to.length) ~ " = " ~ tmp2.intToString(from.length); + msg ~= tmp1.uintToString(to.length) ~ " = " ~ tmp2.uintToString(from.length); throw new Error(msg); } @@ -92,7 +92,7 @@ extern (C) void[] _d_arrayctor(TypeInfo ti, void[] from, void[] to) { char[10] tmp = void; string msg = "lengths don't match for array initialization,"c; - msg ~= tmp.intToString(to.length) ~ " = " ~ tmp.intToString(from.length); + msg ~= tmp.uintToString(to.length) ~ " = " ~ tmp.uintToString(from.length); throw new Error(msg); } diff --git a/src/rt/arraycat.d b/src/rt/arraycat.d index 7f7064a8cde..3b15b7f2369 100644 --- a/src/rt/arraycat.d +++ b/src/rt/arraycat.d @@ -32,7 +32,7 @@ byte[] _d_arraycopy(size_t size, byte[] from, byte[] to) char[10] tmp1 = void; char[10] tmp2 = void; string msg = "lengths don't match for array copy, "c; - msg ~= tmp1.intToString(to.length) ~ " = " ~ tmp2.intToString(from.length); + msg ~= tmp1.uintToString(to.length) ~ " = " ~ tmp2.uintToString(from.length); throw new Error(msg); } else if (to.ptr + to.length * size <= from.ptr || diff --git a/src/rt/util/console.d b/src/rt/util/console.d index 96c903c6f5a..d9483dcacc1 100644 --- a/src/rt/util/console.d +++ b/src/rt/util/console.d @@ -49,7 +49,7 @@ struct Console Console opCall( ulong val ) { char[20] tmp = void; - return opCall( tmp.intToString( val ) ); + return opCall( tmp.uintToString( val ) ); } } diff --git a/src/rt/util/string.d b/src/rt/util/string.d index 4fc3fd7ceb3..28eed42bee8 100644 --- a/src/rt/util/string.d +++ b/src/rt/util/string.d @@ -19,8 +19,7 @@ private import core.stdc.string; pure: nothrow: -// This should be renamed to uintToString() -char[] intToString( char[] buf, uint val ) +char[] uintToString( char[] buf, uint val ) { assert( buf.length > 9 ); auto p = buf.ptr + buf.length; @@ -33,7 +32,7 @@ char[] intToString( char[] buf, uint val ) return buf[p - buf.ptr .. $]; } -char[] intToString( char[] buf, ulong val ) +char[] uintToString( char[] buf, ulong val ) { assert( buf.length >= 20 ); auto p = buf.ptr + buf.length;