kern: KAutoObject doesn't need (virtual) destructor

This commit is contained in:
Michael Scire 2021-09-17 15:08:13 -07:00 committed by SciresM
parent 183243bf16
commit 572cbd8619
29 changed files with 7 additions and 43 deletions

View file

@ -75,7 +75,6 @@ namespace ams::kern {
static KAutoObject *Create(KAutoObject *ptr);
public:
constexpr ALWAYS_INLINE explicit KAutoObject() : m_next_closed_object(nullptr), m_ref_count(0) { MESOSPHERE_ASSERT_THIS(); }
virtual ~KAutoObject() { MESOSPHERE_ASSERT_THIS(); }
/* Destroy is responsible for destroying the auto object's resources when ref_count hits zero. */
virtual void Destroy() { MESOSPHERE_ASSERT_THIS(); }
@ -139,8 +138,10 @@ namespace ams::kern {
private:
friend class KAutoObjectWithListContainer;
private:
util::IntrusiveRedBlackTreeNode list_node;
util::IntrusiveRedBlackTreeNode m_list_node;
public:
constexpr ALWAYS_INLINE KAutoObjectWithList() : m_list_node() { /* ... */ }
static ALWAYS_INLINE int Compare(const KAutoObjectWithList &lhs, const KAutoObjectWithList &rhs) {
const u64 lid = lhs.GetId();
const u64 rid = rhs.GetId();