diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2015-02-24 13:43:37 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2015-02-24 13:43:37 +0000 |
| commit | 46f37a6050e02a958d1cafbd7da42500df88e458 (patch) | |
| tree | d1d9b3e3f2246634b20d3449b0368f79a3e33d5f /src | |
| parent | 0a6901899d844a51ddda3727b587736055b65857 (diff) | |
Always inline RefPtr::{acquire,release,moved}
Diffstat (limited to 'src')
| -rw-r--r-- | src/ref_ptr.hh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ref_ptr.hh b/src/ref_ptr.hh index 792e765c..07f43fbb 100644 --- a/src/ref_ptr.hh +++ b/src/ref_ptr.hh @@ -60,12 +60,14 @@ struct RefPtr private: T* m_ptr = nullptr; + [[gnu::always_inline]] void acquire() { if (m_ptr) inc_ref_count(static_cast<TForOverload*>(m_ptr), this); } + [[gnu::always_inline]] void release() { if (m_ptr) @@ -73,6 +75,7 @@ private: m_ptr = nullptr; } + [[gnu::always_inline]] void moved(void* from) noexcept(noexcept(ref_ptr_moved(static_cast<TForOverload*>(nullptr), nullptr, nullptr))) { |
