diff options
author | David Robillard <d@drobilla.net> | 2011-04-28 18:19:28 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-04-28 18:19:28 +0000 |
commit | 8513a822501175e510591ff15418022a145ddc81 (patch) | |
tree | fbc3668f48d5c5392b895b8084237956252ad3e2 /src/engine/Controller.cpp | |
parent | f87b2217c0108e263669d2c5a80b87bab41f0002 (diff) | |
download | machina-8513a822501175e510591ff15418022a145ddc81.tar.gz machina-8513a822501175e510591ff15418022a145ddc81.tar.bz2 machina-8513a822501175e510591ff15418022a145ddc81.zip |
Improve RingBuffer implementation.
Previous implementation was broken when written to full capacity, and
this version is significantly faster as well.
git-svn-id: http://svn.drobilla.net/lad/trunk/machina@3213 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/Controller.cpp')
-rw-r--r-- | src/engine/Controller.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/engine/Controller.cpp b/src/engine/Controller.cpp index edde2b1..1b92e5f 100644 --- a/src/engine/Controller.cpp +++ b/src/engine/Controller.cpp @@ -15,6 +15,8 @@ * along with Machina. If not, see <http://www.gnu.org/licenses/>. */ +#include "raul/log.hpp" + #include "client/ClientModel.hpp" #include "client/ClientObject.hpp" #include "machina/Controller.hpp" @@ -139,10 +141,11 @@ Controller::disconnect(uint64_t tail_id, uint64_t head_id) SharedPtr<Machina::Node> head = PtrCast<Machina::Node>(find(head_id)); SharedPtr<Edge> edge = tail->remove_edge_to(head); - if (edge) + if (edge) { _client_model.erase_object(edge->id()); - else + } else { Raul::error << "Edge not found" << std::endl; + } } void |