Make element acess in gnss_circular_deque const

This commit is contained in:
Carles Fernandez 2019-09-09 20:21:49 +02:00
parent a1aaf8aff0
commit 79291d04ca
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
1 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ public:
Gnss_circular_deque(const unsigned int max_size, const unsigned int nchann); //!< nchann = number of channels; max_size = channel capacity
unsigned int size(const unsigned int ch); //!< Returns the number of available elements in a channel
T& at(const unsigned int ch, const unsigned int pos); //!< Returns a reference to an element with bount checking
T& get(const unsigned int ch, const unsigned int pos); //!< Returns a reference to an element without bound checking
const T& get(const unsigned int ch, const unsigned int pos) const; //!< Returns a reference to an element without bound checking
T& front(const unsigned int ch); //!< Returns a reference to the first element in the deque
T& back(const unsigned int ch); //!< Returns a reference to the last element in the deque
void push_back(const unsigned int ch, const T& new_data); //!< Inserts an element at the end of the deque
@ -102,7 +102,7 @@ T& Gnss_circular_deque<T>::at(const unsigned int ch, const unsigned int pos)
template <class T>
T& Gnss_circular_deque<T>::get(const unsigned int ch, const unsigned int pos)
const T& Gnss_circular_deque<T>::get(const unsigned int ch, const unsigned int pos) const
{
return d_data[ch][pos];
}