mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
fixed_typemap.hpp: minor cleanup
This commit is contained in:
parent
e133c7a7dc
commit
bacd1698fc
@ -1763,15 +1763,15 @@ s32 error_code::error_report(const fmt_type_info* sup, u64 arg, const fmt_type_i
|
||||
}
|
||||
|
||||
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 <>
|
||||
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;
|
||||
|
@ -51,11 +51,21 @@ namespace stx
|
||||
}
|
||||
};
|
||||
|
||||
// Raw pointers to existing objects (may be nullptr)
|
||||
std::unique_ptr<void*[]> m_list;
|
||||
|
||||
// Creation order for each object (used to reverse destruction 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;
|
||||
|
||||
// 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:
|
||||
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>>()]);
|
||||
}
|
||||
|
||||
// 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…
Reference in New Issue
Block a user