mirror of
https://github.com/dlang/phobos.git
synced 2025-04-27 13:40:20 +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()
|
Node rotateR()
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
assert(_left !is null);
|
assert(_left !is null, "left node must not be null");
|
||||||
}
|
}
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
@ -226,7 +226,7 @@ struct RBNode(V)
|
||||||
Node rotateL()
|
Node rotateL()
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
assert(_right !is null);
|
assert(_right !is null, "right node must not be null");
|
||||||
}
|
}
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
@ -255,7 +255,7 @@ struct RBNode(V)
|
||||||
@property bool isLeftNode() const
|
@property bool isLeftNode() const
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
assert(_parent !is null);
|
assert(_parent !is null, "parent must not be null");
|
||||||
}
|
}
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
@ -789,7 +789,8 @@ if (is(typeof(binaryFun!less(T.init, T.init))))
|
||||||
|
|
||||||
private void _setup()
|
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();
|
_begin = _end = allocate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue