diff --git a/client.d b/client.d index ce2bde2..0920ed4 100644 --- a/client.d +++ b/client.d @@ -26,6 +26,7 @@ import std.process; import std.algorithm; import std.path; import std.file; +import std.conv; import msgpack; import messages; @@ -121,7 +122,7 @@ int main(string[] args) } else { - sourceCode = uninitializedArray!(ubyte[])(cast(size_t) f.size); + sourceCode = uninitializedArray!(ubyte[])(to!size_t(f.size)); f.rawRead(sourceCode); } diff --git a/modulecache.d b/modulecache.d index 7ae3411..64c1a3a 100644 --- a/modulecache.d +++ b/modulecache.d @@ -26,6 +26,7 @@ import stdx.d.ast; import std.stdio; import std.array; import std.path; +import std.conv; import acvisitor; import actypes; @@ -86,7 +87,7 @@ struct ModuleCache try { File f = File(location); - ubyte[] source = uninitializedArray!(ubyte[])(f.size); + ubyte[] source = uninitializedArray!(ubyte[])(to!size_t(f.size)); f.rawRead(source); LexerConfig config;