summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2018-04-18 14:23:12 +0200
committerEugen Wissner <belka@caraus.de>2018-04-18 14:23:12 +0200
commit964a7af32f709b311ac549808ae331827bdcb480 (patch)
treead621160d177688e330ee7d2370e1a4e2babb9c4
parent40c961867eddb7e53d9691baf8b7ae1a68ccaf3b (diff)
downloadtanya-0.8.1.tar.gz
Fix list assertions for release buildv0.8.1
-rw-r--r--source/tanya/container/list.d16
1 files changed, 12 insertions, 4 deletions
diff --git a/source/tanya/container/list.d b/source/tanya/container/list.d
index b271888..81ce4d1 100644
--- a/source/tanya/container/list.d
+++ b/source/tanya/container/list.d
@@ -435,9 +435,9 @@ struct SList(T)
assert(l2.front == 9);
}
- version (assert)
+ private bool checkRangeBelonging(ref const Range r) const
{
- private bool checkRangeBelonging(ref const Range r) const
+ version (assert)
{
const(Entry)* pos = this.head;
for (; pos !is *r.head && pos !is null; pos = pos.next)
@@ -445,6 +445,10 @@ struct SList(T)
}
return pos is *r.head;
}
+ else
+ {
+ return true;
+ }
}
/**
@@ -1602,9 +1606,9 @@ struct DList(T)
/// ditto
alias insert = insertBack;
- version (assert)
+ private bool checkRangeBelonging(ref const Range r) const
{
- private bool checkRangeBelonging(ref const Range r) const
+ version (assert)
{
const(Entry)* pos = this.head;
for (; pos !is *r.head && pos !is null; pos = pos.next)
@@ -1612,6 +1616,10 @@ struct DList(T)
}
return pos is *r.head;
}
+ else
+ {
+ return true;
+ }
}
/**