mirror of https://github.com/gnss-sdr/gnss-sdr
Make element acess in gnss_circular_deque const
This commit is contained in:
parent
a1aaf8aff0
commit
79291d04ca
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue