From cb21a7b08354134307637eb822a3c1ad9cb7ed23 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 1 Jan 2008 19:52:36 +0000 Subject: RAUL code cleanup. git-svn-id: http://svn.drobilla.net/lad/raul@999 a436a847-0d15-0410-975c-d299462d15a1 --- raul/List.hpp | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'raul/List.hpp') diff --git a/raul/List.hpp b/raul/List.hpp index c20a454..1a8b426 100644 --- a/raul/List.hpp +++ b/raul/List.hpp @@ -44,8 +44,7 @@ public: * than the list reader, and insert (e.g. via an Event) it later in the * reader thread. */ - class Node : public Raul::Deletable - { + class Node : public Raul::Deletable { public: Node(T elem) : _elem(elem) {} virtual ~Node() {} @@ -59,7 +58,6 @@ public: void prev(Node* ln) { _prev = ln; } Node* next() const { return _next.get(); } void next(Node* ln) { _next = ln; } - T& elem() { return _elem;} const T& elem() const { return _elem; } @@ -70,19 +68,15 @@ public: }; - // List - - List() - : _size(0), _end_iter(this), _const_end_iter(this) - { + List() : _size(0), _end_iter(this), _const_end_iter(this) { _end_iter._listnode = NULL; _const_end_iter._listnode = NULL; } ~List(); - void push_back(Node* elem); // realtime safe - void push_back(T& elem); // NOT realtime safe + void push_back(Node* elem); ///< Realtime Safe + void push_back(T& elem); ///< NOT Realtime Safe void append(List& list); @@ -97,8 +91,7 @@ public: class iterator; /** Realtime safe const iterator for a List. */ - class const_iterator - { + class const_iterator { public: const_iterator(const List* const list); const_iterator(const iterator& i) @@ -121,8 +114,7 @@ public: /** Realtime safe iterator for a List. */ - class iterator - { + class iterator { public: iterator(List* const list); @@ -147,11 +139,9 @@ public: iterator find(const T& val); - iterator begin(); - const iterator end() const; - + iterator begin(); const_iterator begin() const; - //const_iterator end() const; + const iterator end() const; private: AtomicPtr _head; -- cgit v1.2.1