diff options
author | bunnei <bunneidev@gmail.com> | 2021-05-01 21:51:11 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-05-06 01:40:54 +0200 |
commit | 9beb239634735dc026f55b20d31763cdc295d15c (patch) | |
tree | b4a3715927ede917d8ad306a9d6185c0cf77e9c9 /src/core/hle/kernel | |
parent | fixup! hle: kernel: Migrate to KHandleTable. (diff) | |
download | yuzu-9beb239634735dc026f55b20d31763cdc295d15c.tar yuzu-9beb239634735dc026f55b20d31763cdc295d15c.tar.gz yuzu-9beb239634735dc026f55b20d31763cdc295d15c.tar.bz2 yuzu-9beb239634735dc026f55b20d31763cdc295d15c.tar.lz yuzu-9beb239634735dc026f55b20d31763cdc295d15c.tar.xz yuzu-9beb239634735dc026f55b20d31763cdc295d15c.tar.zst yuzu-9beb239634735dc026f55b20d31763cdc295d15c.zip |
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r-- | src/core/hle/kernel/k_linked_list.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/core/hle/kernel/k_linked_list.h b/src/core/hle/kernel/k_linked_list.h index 8218bac8d..500f44685 100644 --- a/src/core/hle/kernel/k_linked_list.h +++ b/src/core/hle/kernel/k_linked_list.h @@ -15,19 +15,20 @@ class KernelCore; class KLinkedListNode : public boost::intrusive::list_base_hook<>, public KSlabAllocated<KLinkedListNode> { -private: - void* m_item; public: - KLinkedListNode() : m_item(nullptr) {} + KLinkedListNode() = default; - constexpr void Initialize(void* it) { + void Initialize(void* it) { m_item = it; } - constexpr void* GetItem() const { + void* GetItem() const { return m_item; } + +private: + void* m_item = nullptr; }; template <typename T> @@ -61,13 +62,9 @@ public: using iterator_category = std::bidirectional_iterator_tag; using value_type = typename KLinkedList::value_type; using difference_type = typename KLinkedList::difference_type; - using pointer = typename std::conditional<Const, KLinkedList::const_pointer, - KLinkedList::pointer>::type; - using reference = typename std::conditional<Const, KLinkedList::const_reference, - KLinkedList::reference>::type; - - private: - BaseIterator m_base_it; + using pointer = std::conditional_t<Const, KLinkedList::const_pointer, KLinkedList::pointer>; + using reference = + std::conditional_t<Const, KLinkedList::const_reference, KLinkedList::reference>; public: explicit Iterator(BaseIterator it) : m_base_it(it) {} @@ -117,6 +114,9 @@ public: operator Iterator<true>() const { return Iterator<true>(m_base_it); } + + private: + BaseIterator m_base_it; }; public: |