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;
}
[[gnu::always_inline]]
T* operator->() const { return m_ptr; }
[[gnu::always_inline]]
T& operator*() const { return *m_ptr; }
[[gnu::always_inline]]
T* get() const { return m_ptr; }
[[gnu::always_inline]]
explicit operator bool() const { return m_ptr; }
void reset(T* ptr = nullptr)