Fix list assertions for release build
This commit is contained in:
parent
40c961867e
commit
964a7af32f
@ -435,9 +435,9 @@ struct SList(T)
|
||||
assert(l2.front == 9);
|
||||
}
|
||||
|
||||
version (assert)
|
||||
{
|
||||
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
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user