mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-29 10:02:57 +03:00
always_inline a few methods
This commit is contained in:
parent
8ba6804480
commit
e9af3a4217
@ -44,6 +44,8 @@ public:
|
||||
|
||||
constexpr T* pointer() const { return m_pointer; }
|
||||
constexpr size_t size() const { return m_size; }
|
||||
|
||||
[[gnu::always_inline]]
|
||||
constexpr T& operator[](size_t n) const { return *(m_pointer + n); }
|
||||
|
||||
constexpr T* begin() const { return m_pointer; }
|
||||
|
@ -18,7 +18,9 @@ struct MirroredArray : public ArrayView<T>
|
||||
(*this)[i] = 0;
|
||||
}
|
||||
|
||||
[[gnu::always_inline]]
|
||||
T& operator[](int n) { return ArrayView<T>::operator[](n + size); }
|
||||
[[gnu::always_inline]]
|
||||
const T& operator[](int n) const { return ArrayView<T>::operator[](n + size); }
|
||||
private:
|
||||
int size;
|
||||
|
Loading…
Reference in New Issue
Block a user