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; + } } /**