From 30917430e23abffc9444ddf1424025771a3f26a6 Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Fri, 20 May 2016 09:23:48 +1000 Subject: [PATCH] EKF: inline ring buffer functions used repeatedly These functions get called 30 times each per output prediction cycle --- EKF/RingBuffer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EKF/RingBuffer.h b/EKF/RingBuffer.h index b16f25cde1..5c453bc87f 100644 --- a/EKF/RingBuffer.h +++ b/EKF/RingBuffer.h @@ -161,7 +161,7 @@ public: } // return data at the specified index - data_type get_from_index(unsigned index) + inline data_type get_from_index(unsigned index) { if (index >= _size) { index = _size-1; @@ -170,7 +170,7 @@ public: } // push data to the specified index - void push_to_index(unsigned index, data_type sample) + inline void push_to_index(unsigned index, data_type sample) { if (index >= _size) { index = _size-1;