Skip to content
Snippets Groups Projects
Commit cd139741 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

fix swap of tree structures

parent 8551d397
No related branches found
No related tags found
No related merge requests found
......@@ -519,8 +519,8 @@ public:
friend void swap ( forward_tree & first, forward_tree & second ) {
using std::swap;
 
swap ( std::move ( first.m_data ), std::move ( second.m_data ) );
swap ( std::move ( first.m_children ), std::move ( second.m_children ) );
swap ( first.m_data, second.m_data );
swap ( first.m_children, second.m_children );
}
 
// ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
......
......@@ -554,9 +554,9 @@ public:
friend void swap ( tree & first, tree & second ) {
using std::swap;
 
swap ( std::move ( first.m_data ), std::move ( second.m_data ) );
swap ( std::move ( first.m_children ), std::move ( second.m_children ) );
swap ( std::move ( first.m_parent ), std::move ( second.m_parent ) );
swap ( first.m_data, second.m_data );
swap ( first.m_children, second.m_children );
swap ( first.m_parent, second.m_parent );
}
 
// ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment