From 1c831b41da04d44aca5afe35e67b4b983b2f2a21 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 4 Nov 2015 19:47:26 +0000 Subject: [PATCH] always_inline a few RefPtr operators --- src/ref_ptr.hh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ref_ptr.hh b/src/ref_ptr.hh index 07f43fbb0..2c284dae6 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)