diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-03-13 14:16:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-13 14:16:16 +0100 |
commit | 1f952f6ac9e3aca3dba8e4286fe937616081a767 (patch) | |
tree | ca57513605bdef4767762614c074ca90b7791575 /src/core/hle/kernel/k_auto_object.h | |
parent | Merge pull request #9942 from liamwhite/speling (diff) | |
parent | kernel: additional style fixes to KThread, KProcess (diff) | |
download | yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.tar yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.tar.gz yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.tar.bz2 yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.tar.lz yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.tar.xz yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.tar.zst yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/k_auto_object.h | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/core/hle/kernel/k_auto_object.h b/src/core/hle/kernel/k_auto_object.h index e8118c2b8..9b71fe371 100644 --- a/src/core/hle/kernel/k_auto_object.h +++ b/src/core/hle/kernel/k_auto_object.h @@ -80,7 +80,7 @@ private: KERNEL_AUTOOBJECT_TRAITS_IMPL(KAutoObject, KAutoObject, const); public: - explicit KAutoObject(KernelCore& kernel_) : kernel(kernel_) { + explicit KAutoObject(KernelCore& kernel) : m_kernel(kernel) { RegisterWithKernel(); } virtual ~KAutoObject() = default; @@ -164,17 +164,12 @@ public: } } - const std::string& GetName() const { - return name; - } - private: void RegisterWithKernel(); void UnregisterWithKernel(); protected: - KernelCore& kernel; - std::string name; + KernelCore& m_kernel; private: std::atomic<u32> m_ref_count{}; @@ -184,7 +179,7 @@ class KAutoObjectWithListContainer; class KAutoObjectWithList : public KAutoObject, public boost::intrusive::set_base_hook<> { public: - explicit KAutoObjectWithList(KernelCore& kernel_) : KAutoObject(kernel_) {} + explicit KAutoObjectWithList(KernelCore& kernel) : KAutoObject(kernel) {} static int Compare(const KAutoObjectWithList& lhs, const KAutoObjectWithList& rhs) { const u64 lid = lhs.GetId(); @@ -200,7 +195,7 @@ public: } friend bool operator<(const KAutoObjectWithList& left, const KAutoObjectWithList& right) { - return &left < &right; + return KAutoObjectWithList::Compare(left, right) < 0; } public: @@ -208,10 +203,6 @@ public: return reinterpret_cast<u64>(this); } - virtual const std::string& GetName() const { - return name; - } - private: friend class KAutoObjectWithListContainer; }; |