From 4e39fc61d942f701b0af4217a4396b9c2d1a8d3a Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Sat, 19 Apr 2014 17:13:44 +0400 Subject: [PATCH] LinkedListRoot<>::remove() does not return anything, as it was not used anyway --- libuavcan/include/uavcan/linked_list.hpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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; } }