mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-11-14 00:56:35 +00:00
kern: remove need for explicit reserved member in KAutoObject
This commit is contained in:
parent
bfffe6b119
commit
96d3187f3e
1 changed files with 10 additions and 7 deletions
|
@ -77,17 +77,13 @@ namespace ams::kern {
|
||||||
std::atomic<u32> m_ref_count;
|
std::atomic<u32> m_ref_count;
|
||||||
#if defined(MESOSPHERE_ENABLE_DEVIRTUALIZED_DYNAMIC_CAST)
|
#if defined(MESOSPHERE_ENABLE_DEVIRTUALIZED_DYNAMIC_CAST)
|
||||||
ClassTokenType m_class_token;
|
ClassTokenType m_class_token;
|
||||||
#else
|
|
||||||
u32 m_reserved;
|
|
||||||
#endif
|
#endif
|
||||||
public:
|
public:
|
||||||
static KAutoObject *Create(KAutoObject *ptr);
|
static KAutoObject *Create(KAutoObject *ptr);
|
||||||
public:
|
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)
|
#if defined(MESOSPHERE_ENABLE_DEVIRTUALIZED_DYNAMIC_CAST)
|
||||||
m_class_token(0)
|
, m_class_token(0)
|
||||||
#else
|
|
||||||
m_reserved(0)
|
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
MESOSPHERE_ASSERT_THIS();
|
MESOSPHERE_ASSERT_THIS();
|
||||||
|
@ -159,7 +155,14 @@ namespace ams::kern {
|
||||||
|
|
||||||
class KAutoObjectWithListContainer;
|
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:
|
private:
|
||||||
friend class KAutoObjectWithListContainer;
|
friend class KAutoObjectWithListContainer;
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in a new issue