summaryrefslogtreecommitdiff
path: root/src/ref_ptr.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-11-04 19:47:26 +0000
committerMaxime Coste <frrrwww@gmail.com>2015-11-04 19:47:26 +0000
commit1c831b41da04d44aca5afe35e67b4b983b2f2a21 (patch)
treec2f9dfb861abd8a511c7564b303d30d5e393fb0c /src/ref_ptr.hh
parente82ca36117d98a884571798785b4e0d801229491 (diff)
always_inline a few RefPtr operators
Diffstat (limited to 'src/ref_ptr.hh')
-rw-r--r--src/ref_ptr.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ref_ptr.hh b/src/ref_ptr.hh
index 07f43fbb..2c284dae 100644
--- a/src/ref_ptr.hh
+++ b/src/ref_ptr.hh
@@ -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)