From 555a1dd696cf6f98f81af4936d774125b0ca225f Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Sun, 18 Aug 2013 17:10:58 +0000 Subject: [PATCH] More Windows fixes --- client.d | 3 ++- modulecache.d | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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;