mirror of
https://github.com/dlang/phobos.git
synced 2025-04-27 05:30:33 +03:00
adding assert messages to rbtree
This commit is contained in:
parent
18bf58f157
commit
09bede3b80
1 changed files with 5 additions and 4 deletions
|
@ -183,7 +183,7 @@ struct RBNode(V)
|
|||
Node rotateR()
|
||||
in
|
||||
{
|
||||
assert(_left !is null);
|
||||
assert(_left !is null, "left node must not be null");
|
||||
}
|
||||
do
|
||||
{
|
||||
|
@ -226,7 +226,7 @@ struct RBNode(V)
|
|||
Node rotateL()
|
||||
in
|
||||
{
|
||||
assert(_right !is null);
|
||||
assert(_right !is null, "right node must not be null");
|
||||
}
|
||||
do
|
||||
{
|
||||
|
@ -255,7 +255,7 @@ struct RBNode(V)
|
|||
@property bool isLeftNode() const
|
||||
in
|
||||
{
|
||||
assert(_parent !is null);
|
||||
assert(_parent !is null, "parent must not be null");
|
||||
}
|
||||
do
|
||||
{
|
||||
|
@ -789,7 +789,8 @@ if (is(typeof(binaryFun!less(T.init, T.init))))
|
|||
|
||||
private void _setup()
|
||||
{
|
||||
assert(!_end); //Make sure that _setup isn't run more than once.
|
||||
//Make sure that _setup isn't run more than once.
|
||||
assert(!_end, "Setup must only be run once");
|
||||
_begin = _end = allocate();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue