From dcc3873056f8e845fce4ac5fdbd63bbf9f068b33 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 21 Apr 2013 22:24:46 +1000 Subject: [PATCH] AP_Buffer: remove bool return from add() method --- libraries/AP_Buffer/AP_Buffer.cpp | 9 +++------ libraries/AP_Buffer/AP_Buffer.h | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/libraries/AP_Buffer/AP_Buffer.cpp b/libraries/AP_Buffer/AP_Buffer.cpp index 8dd9dd3fd2..9dc5450b57 100644 --- a/libraries/AP_Buffer/AP_Buffer.cpp +++ b/libraries/AP_Buffer/AP_Buffer.cpp @@ -25,7 +25,7 @@ void AP_Buffer::clear() { // add - adds an item to the buffer. returns TRUE if successfully added template -bool AP_Buffer::add( T item ) +void AP_Buffer::add( T item ) { // determine position of new item uint8_t tail = _head + _num_items; @@ -46,9 +46,6 @@ bool AP_Buffer::add( T item ) _head = 0; } } - - // indicate success - return true; } // get - returns the next value in the buffer @@ -99,9 +96,9 @@ T AP_Buffer::peek(uint8_t position) const template float AP_Buffer::peek(uint8_t position) const; template AP_Buffer::AP_Buffer(); template void AP_Buffer::clear(); -template bool AP_Buffer::add(float); +template void AP_Buffer::add(float); template float AP_Buffer::peek(uint8_t position) const; template AP_Buffer::AP_Buffer(); template void AP_Buffer::clear(); -template bool AP_Buffer::add(float); +template void AP_Buffer::add(float); diff --git a/libraries/AP_Buffer/AP_Buffer.h b/libraries/AP_Buffer/AP_Buffer.h index 433e715782..37fbd49a2e 100644 --- a/libraries/AP_Buffer/AP_Buffer.h +++ b/libraries/AP_Buffer/AP_Buffer.h @@ -19,7 +19,7 @@ public: void clear(); // add - adds an item to the buffer. returns TRUE if successfully added - bool add( T item ); + void add( T item ); // get - returns the next value in the buffer T get();