summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2018-01-04 05:36:46 +0100
committerEugen Wissner <belka@caraus.de>2018-01-04 05:36:46 +0100
commit8db1851c5ce4c74676e38c822f8678aaba421a3c (patch)
tree42e6701f007c9fdfc8f5c791ec9d5198d1093b80 /source
parent12de700706c0ef69b4257f91b736b4d1b5aa5151 (diff)
downloadtanya-8db1851c5ce4c74676e38c822f8678aaba421a3c.tar.gz
Update dmd to 2.078.0
Diffstat (limited to 'source')
-rw-r--r--source/tanya/container/string.d3
-rw-r--r--source/tanya/math/mp.d6
2 files changed, 6 insertions, 3 deletions
diff --git a/source/tanya/container/string.d b/source/tanya/container/string.d
index 73aab41..1b95cfd 100644
--- a/source/tanya/container/string.d
+++ b/source/tanya/container/string.d
@@ -264,7 +264,8 @@ if (is(Unqual!E == char))
body
{
dchar chr;
- ubyte units, mask;
+ ubyte units;
+ int mask;
const(char)* it = this.begin;
if (*it & 0x80)
diff --git a/source/tanya/math/mp.d b/source/tanya/math/mp.d
index a045b25..f062c47 100644
--- a/source/tanya/math/mp.d
+++ b/source/tanya/math/mp.d
@@ -393,7 +393,9 @@ struct Integer
T opCast(T)() const
if (isIntegral!T && isSigned!T)
{
- return this.sign ? -(cast(Unsigned!T) this) : cast(Unsigned!T) this;
+ return this.sign
+ ? cast(T) -(cast(Promoted!(Unsigned!T)) (cast(Unsigned!T) this))
+ : cast(Unsigned!T) this;
}
///
@@ -1072,7 +1074,7 @@ struct Integer
assert(h1 == 79);
h2 = ~h1;
- assert(h2 == ~cast(ubyte) 79);
+ assert(h2 == cast(ubyte) ~79);
}
/// ditto