mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 10:18:40 +12:00
fixed_typemap.hpp: minor cleanup
This commit is contained in:
parent
e133c7a7dc
commit
bacd1698fc
2 changed files with 14 additions and 10 deletions
|
@ -1763,15 +1763,15 @@ s32 error_code::error_report(const fmt_type_info* sup, u64 arg, const fmt_type_i
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
void stx::manual_fixed_typemap<void>::init_reporter(const char* name, unsigned long long created)
|
void stx::manual_fixed_typemap<void>::init_reporter(const char* name, unsigned long long created) const noexcept
|
||||||
{
|
{
|
||||||
sys_log.notice("Object '%s' was created [%u]", name, created);
|
sys_log.notice("[ord:%u] Object '%s' was created", created, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
void stx::manual_fixed_typemap<void>::destroy_reporter(const char* name, unsigned long long created)
|
void stx::manual_fixed_typemap<void>::destroy_reporter(const char* name, unsigned long long created) const noexcept
|
||||||
{
|
{
|
||||||
sys_log.notice("Object '%s' was destroyed [%u]", name, created);
|
sys_log.notice("[ord:%u] Object '%s' is destroying", created, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
Emulator Emu;
|
Emulator Emu;
|
||||||
|
|
|
@ -51,11 +51,21 @@ namespace stx
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Raw pointers to existing objects (may be nullptr)
|
||||||
std::unique_ptr<void*[]> m_list;
|
std::unique_ptr<void*[]> m_list;
|
||||||
|
|
||||||
|
// Creation order for each object (used to reverse destruction order)
|
||||||
std::unique_ptr<unsigned long long[]> m_order;
|
std::unique_ptr<unsigned long long[]> m_order;
|
||||||
|
|
||||||
|
// Used to generate creation order (increased on every construction)
|
||||||
unsigned long long m_init_count = 0;
|
unsigned long long m_init_count = 0;
|
||||||
|
|
||||||
|
// Body is somewhere else if enabled
|
||||||
|
void init_reporter(const char* name, unsigned long long created) const noexcept;
|
||||||
|
|
||||||
|
// Body is somewhere else if enabled
|
||||||
|
void destroy_reporter(const char* name, unsigned long long created) const noexcept;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
constexpr manual_fixed_typemap() noexcept = default;
|
constexpr manual_fixed_typemap() noexcept = default;
|
||||||
|
|
||||||
|
@ -209,11 +219,5 @@ namespace stx
|
||||||
{
|
{
|
||||||
return static_cast<T*>(m_list[stx::typeindex<typeinfo, std::decay_t<T>>()]);
|
return static_cast<T*>(m_list[stx::typeindex<typeinfo, std::decay_t<T>>()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Body is somewhere else if enabled
|
|
||||||
void init_reporter(const char* name, unsigned long long created);
|
|
||||||
|
|
||||||
// Body is somewhere else if enabled
|
|
||||||
void destroy_reporter(const char* name, unsigned long long created);
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue