mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-25 20:41:49 +03:00
Always inline RefPtr::{acquire,release,moved}
This commit is contained in:
parent
0a6901899d
commit
46f37a6050
@ -60,12 +60,14 @@ struct RefPtr
|
|||||||
private:
|
private:
|
||||||
T* m_ptr = nullptr;
|
T* m_ptr = nullptr;
|
||||||
|
|
||||||
|
[[gnu::always_inline]]
|
||||||
void acquire()
|
void acquire()
|
||||||
{
|
{
|
||||||
if (m_ptr)
|
if (m_ptr)
|
||||||
inc_ref_count(static_cast<TForOverload*>(m_ptr), this);
|
inc_ref_count(static_cast<TForOverload*>(m_ptr), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[[gnu::always_inline]]
|
||||||
void release()
|
void release()
|
||||||
{
|
{
|
||||||
if (m_ptr)
|
if (m_ptr)
|
||||||
@ -73,6 +75,7 @@ private:
|
|||||||
m_ptr = nullptr;
|
m_ptr = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[[gnu::always_inline]]
|
||||||
void moved(void* from)
|
void moved(void* from)
|
||||||
noexcept(noexcept(ref_ptr_moved(static_cast<TForOverload*>(nullptr), nullptr, nullptr)))
|
noexcept(noexcept(ref_ptr_moved(static_cast<TForOverload*>(nullptr), nullptr, nullptr)))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user