1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-25 10:32:19 +03:00

always_inline a few RefPtr operators

This commit is contained in:
Maxime Coste 2015-11-04 19:47:26 +00:00
parent e82ca36117
commit 1c831b41da

View File

@ -38,11 +38,15 @@ struct RefPtr
return *this; return *this;
} }
[[gnu::always_inline]]
T* operator->() const { return m_ptr; } T* operator->() const { return m_ptr; }
[[gnu::always_inline]]
T& operator*() const { return *m_ptr; } T& operator*() const { return *m_ptr; }
[[gnu::always_inline]]
T* get() const { return m_ptr; } T* get() const { return m_ptr; }
[[gnu::always_inline]]
explicit operator bool() const { return m_ptr; } explicit operator bool() const { return m_ptr; }
void reset(T* ptr = nullptr) void reset(T* ptr = nullptr)