mirror of
https://github.com/xfarrow/lasd.git
synced 2025-06-05 21:49:14 +02:00
Library 4
This commit is contained in:
@ -465,8 +465,8 @@ BTInOrderIterator<Data>::BTInOrderIterator(const BTInOrderIterator& itr){
|
||||
|
||||
template <typename Data>
|
||||
BTInOrderIterator<Data>::BTInOrderIterator(BTInOrderIterator&& toMove) noexcept{
|
||||
std::move(curr, toMove.curr);
|
||||
std::move(stack, toMove.stack);
|
||||
std::swap(curr, toMove.curr);
|
||||
std::swap(stack, toMove.stack);
|
||||
}
|
||||
|
||||
template <typename Data>
|
||||
@ -484,8 +484,8 @@ BTInOrderIterator<Data>& BTInOrderIterator<Data>::operator=(const BTInOrderItera
|
||||
|
||||
template <typename Data>
|
||||
BTInOrderIterator<Data>& BTInOrderIterator<Data>::operator=(BTInOrderIterator&& toMove) noexcept{
|
||||
std::move(curr, toMove.curr);
|
||||
std::move(stack, toMove.stack);
|
||||
std::swap(curr, toMove.curr);
|
||||
std::swap(stack, toMove.stack);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,6 @@ BinaryTreeLnk<Data>& BinaryTreeLnk<Data>::operator=(const BinaryTreeLnk<Data>& t
|
||||
|
||||
template <typename Data>
|
||||
BinaryTreeLnk<Data>& BinaryTreeLnk<Data>::operator=(BinaryTreeLnk<Data>&& tree) noexcept{
|
||||
Clear();
|
||||
std::swap(size, tree.size);
|
||||
std::swap(root, tree.root);
|
||||
return *this;
|
||||
|
@ -117,12 +117,14 @@ BinaryTreeVec<Data>& BinaryTreeVec<Data>::operator=(const BinaryTreeVec<Data>& b
|
||||
|
||||
template <typename Data>
|
||||
BinaryTreeVec<Data>& BinaryTreeVec<Data>::operator=(BinaryTreeVec<Data>&& bt) noexcept{
|
||||
Clear();
|
||||
std::swap(size, bt.size);
|
||||
std::swap(tree, bt.tree);
|
||||
for(ulong i=0 ; i<size ; ++i){
|
||||
tree[i]->ReferenceToTree = this;
|
||||
}
|
||||
for(ulong j=0 ; j<bt.Size() ; ++j){
|
||||
(bt.tree[j])->ReferenceToTree = &bt;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user