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

Always inline RefPtr::{acquire,release,moved}

This commit is contained in:
Maxime Coste 2015-02-24 13:43:37 +00:00
parent 0a6901899d
commit 46f37a6050

View File

@ -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)))
{