summaryrefslogtreecommitdiffstats
path: root/raul/Queue.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
commit4e68bf298f9fe4445925b4fe39f28e364a216fd2 (patch)
tree199cf1eb30a32554cffd5f5aa1ac26ad7bf89dba /raul/Queue.h
parente22d5e4bfa4e5de0cba97c0e1a4ea71de9ecbe48 (diff)
downloadraul-4e68bf298f9fe4445925b4fe39f28e364a216fd2.tar.gz
raul-4e68bf298f9fe4445925b4fe39f28e364a216fd2.tar.bz2
raul-4e68bf298f9fe4445925b4fe39f28e364a216fd2.zip
Used boost::noncopyable to eliminate undefined private copy constructors spread everywhere.
git-svn-id: http://svn.drobilla.net/lad/raul@182 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'raul/Queue.h')
-rw-r--r--raul/Queue.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/raul/Queue.h b/raul/Queue.h
index 071ed4e..36d1cca 100644
--- a/raul/Queue.h
+++ b/raul/Queue.h
@@ -19,6 +19,7 @@
#include <cassert>
#include <cstdlib>
+#include <boost/utility.hpp>
/** Realtime-safe single-reader single-writer queue (aka lock-free ringbuffer)
@@ -32,7 +33,7 @@
* \ingroup raul
*/
template <typename T>
-class Queue
+class Queue : boost::noncopyable
{
public:
Queue(size_t size);
@@ -50,10 +51,6 @@ public:
inline T& pop();
private:
- // Prevent copies (these are undefined)
- Queue(const Queue& copy);
- Queue& operator=(const Queue& copy);
-
volatile size_t m_front; ///< Index to front of queue (circular)
volatile size_t m_back; ///< Index to back of queue (one past last element) (circular)
const size_t m_size; ///< Size of @ref m_objects (you can store m_size-1 objects)