mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 03:25:16 +00:00
fixed_typemap.hpp: polish move constructor a bit
GitHub, plz.
This commit is contained in:
parent
d5c85f308a
commit
d0b2eecc9a
1 changed files with 5 additions and 4 deletions
|
@ -62,10 +62,11 @@ namespace stx
|
|||
manual_fixed_typemap(const manual_fixed_typemap&) = delete;
|
||||
|
||||
manual_fixed_typemap(manual_fixed_typemap&& r) noexcept
|
||||
: m_list(std::move(r.m_list))
|
||||
, m_order(std::move(r.m_order))
|
||||
, m_init_count(r.m_init_count)
|
||||
{
|
||||
std::swap(m_list, r.m_list);
|
||||
std::swap(m_order, r.m_order);
|
||||
std::swap(m_init_count, r.m_init_count);
|
||||
r.m_init_count = 0;
|
||||
}
|
||||
|
||||
manual_fixed_typemap& operator=(const manual_fixed_typemap&) = delete;
|
||||
|
@ -80,7 +81,7 @@ namespace stx
|
|||
|
||||
~manual_fixed_typemap()
|
||||
{
|
||||
if (!m_list)
|
||||
if (!m_list && !m_order)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue