* Added assignment operators.
* Some automatic whitespace cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34783 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2008, Ingo Weinhold <[email protected]>.
|
* Copyright 2008-2009, Ingo Weinhold <[email protected]>.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Original Java implementation:
|
* Original Java implementation:
|
||||||
@@ -255,6 +255,12 @@ public:
|
|||||||
return closestNode;
|
return closestNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SplayTree& operator=(const SplayTree& other)
|
||||||
|
{
|
||||||
|
fRoot = other.fRoot;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/*!
|
/*!
|
||||||
Internal method to perform a top-down splay.
|
Internal method to perform a top-down splay.
|
||||||
@@ -587,6 +593,13 @@ public:
|
|||||||
return ConstIterator(this, FindClosest(key, greater, orEqual));
|
return ConstIterator(this, FindClosest(key, greater, orEqual));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IteratableSplayTree& operator=(const IteratableSplayTree& other)
|
||||||
|
{
|
||||||
|
fTree = other.fTree;
|
||||||
|
fFirst = other.fFirst;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
friend class Iterator;
|
friend class Iterator;
|
||||||
friend class ConstIterator;
|
friend class ConstIterator;
|
||||||
|
|||||||
Reference in New Issue
Block a user