diff --git a/libuavcan/include/uavcan/linked_list.hpp b/libuavcan/include/uavcan/linked_list.hpp index b2e02d9067..59c1ebb488 100644 --- a/libuavcan/include/uavcan/linked_list.hpp +++ b/libuavcan/include/uavcan/linked_list.hpp @@ -62,7 +62,7 @@ public: template void insertBefore(T* node, Predicate predicate); - bool remove(const T* node); + void remove(const T* node); }; // ---------------------------------------------------------------------------- @@ -120,17 +120,16 @@ void LinkedListRoot::insertBefore(T* node, Predicate predicate) } template -bool LinkedListRoot::remove(const T* node) +void LinkedListRoot::remove(const T* node) { if (root_ == NULL || node == NULL) { - return false; + return; } if (root_ == node) { root_ = root_->getNextListNode(); - return true; } else { @@ -140,11 +139,10 @@ bool LinkedListRoot::remove(const T* node) if (p->getNextListNode() == node) { p->setNextListNode(p->getNextListNode()->getNextListNode()); - return true; + break; } p = p->getNextListNode(); } - return false; } }