summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/Tree.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-10-16 07:28:30 +0000
committerDavid Robillard <d@drobilla.net>2006-10-16 07:28:30 +0000
commitd38458e73cf7dfe02d2ea0ceb050f64df43413b8 (patch)
tree298face3d076487f61a388a85001cc01a26a7d43 /src/libs/engine/Tree.h
parentd5049d43809c7546afcc2938791a90c7973d0fc2 (diff)
downloadingen-d38458e73cf7dfe02d2ea0ceb050f64df43413b8.tar.gz
ingen-d38458e73cf7dfe02d2ea0ceb050f64df43413b8.tar.bz2
ingen-d38458e73cf7dfe02d2ea0ceb050f64df43413b8.zip
Used boost::noncopyable to eliminate undefined private copy constructors spread everywhere.
git-svn-id: http://svn.drobilla.net/lad/ingen@182 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/Tree.h')
-rw-r--r--src/libs/engine/Tree.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/libs/engine/Tree.h b/src/libs/engine/Tree.h
index bcc39934..8750b717 100644
--- a/src/libs/engine/Tree.h
+++ b/src/libs/engine/Tree.h
@@ -19,6 +19,7 @@
#include <string>
#include <cassert>
+#include <boost/utility.hpp>
#include "MaidObject.h"
using std::string;
@@ -65,10 +66,6 @@ public:
friend class Tree<T>;
protected:
- // Prevent copies (undefined)
- TreeNode(const TreeNode&);
- TreeNode& operator=(const TreeNode&);
-
TreeNode<T>* m_parent;
TreeNode<T>* m_left_child;
TreeNode<T>* m_right_child;
@@ -92,7 +89,7 @@ protected:
* of Tree<T> do not use them.
*/
template <typename T>
-class Tree
+class Tree : boost::noncopyable
{
public:
Tree() : m_root(0), m_size(0) {}
@@ -132,10 +129,6 @@ public:
iterator end() const;
private:
- // Prevent copies (undefined)
- Tree<T>(const Tree<T>&);
- Tree<T>& operator=(const Tree<T>&);
-
void m_set_all_traversed_recursive(TreeNode<T>* root, bool b);
TreeNode<T>* m_find_smallest(TreeNode<T>* root);