Compare commits

...

1 Commits

Author SHA1 Message Date
Michael Carroll
225f098ab5 Mark overridden functions in the RingBuffer Implementation
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
2024-01-24 19:04:51 +00:00

View File

@@ -67,7 +67,7 @@ public:
*
* \param request the element to be stored in the ring buffer
*/
void enqueue(BufferT request)
void enqueue(BufferT request) override
{
std::lock_guard<std::mutex> lock(mutex_);
@@ -93,7 +93,7 @@ public:
*
* \return the element that is being removed from the ring buffer
*/
BufferT dequeue()
BufferT dequeue() override
{
std::lock_guard<std::mutex> lock(mutex_);
@@ -144,7 +144,7 @@ public:
*
* \return `true` if there is data and `false` otherwise
*/
inline bool has_data() const
inline bool has_data() const override
{
std::lock_guard<std::mutex> lock(mutex_);
return has_data_();
@@ -169,13 +169,13 @@ public:
*
* \return the number of free capacity for new messages
*/
size_t available_capacity() const
size_t available_capacity() const override
{
std::lock_guard<std::mutex> lock(mutex_);
return available_capacity_();
}
void clear()
void clear() override
{
TRACETOOLS_TRACEPOINT(rclcpp_ring_buffer_clear, static_cast<const void *>(this));
}