kern: remove need for explicit reserved member in KAutoObject

This commit is contained in:
Michael Scire 2021-10-16 17:17:26 -07:00
parent bfffe6b119
commit 96d3187f3e

View file

@ -77,17 +77,13 @@ namespace ams::kern {
std::atomic<u32> m_ref_count;
#if defined(MESOSPHERE_ENABLE_DEVIRTUALIZED_DYNAMIC_CAST)
ClassTokenType m_class_token;
#else
u32 m_reserved;
#endif
public:
static KAutoObject *Create(KAutoObject *ptr);
public:
constexpr ALWAYS_INLINE explicit KAutoObject() : m_next_closed_object(nullptr), m_ref_count(0),
constexpr ALWAYS_INLINE explicit KAutoObject() : m_next_closed_object(nullptr), m_ref_count(0)
#if defined(MESOSPHERE_ENABLE_DEVIRTUALIZED_DYNAMIC_CAST)
m_class_token(0)
#else
m_reserved(0)
, m_class_token(0)
#endif
{
MESOSPHERE_ASSERT_THIS();
@ -159,7 +155,14 @@ namespace ams::kern {
class KAutoObjectWithListContainer;
class KAutoObjectWithList : public KAutoObject {
class KAutoObjectWithListBase : public KAutoObject {
private:
void *m_alignment_forcer_unused[0]{};
public:
constexpr ALWAYS_INLINE KAutoObjectWithListBase() = default;
};
class KAutoObjectWithList : public KAutoObjectWithListBase {
private:
friend class KAutoObjectWithListContainer;
private: