diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2021-09-09 16:30:59 +0430 |
---|---|---|
committer | Idan Horowitz <idan.horowitz@gmail.com> | 2021-09-10 18:05:46 +0300 |
commit | 5a0cdb15b07ef87cbab6203fad8c0dcea3634f67 (patch) | |
tree | c7d38b2113aa030893f1f22560faf8e288f00940 /Tests | |
parent | 93cf01ad7db21ec5f48a46e206356ea791158fca (diff) | |
download | serenity-5a0cdb15b07ef87cbab6203fad8c0dcea3634f67.zip |
AK+Everywhere: Reduce the number of template parameters of IntrusiveList
This makes the user-facing type only take the node member pointer, and
lets the compiler figure out the other needed types from that.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/AK/TestIntrusiveList.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Tests/AK/TestIntrusiveList.cpp b/Tests/AK/TestIntrusiveList.cpp index 923de96f3e..ef24015247 100644 --- a/Tests/AK/TestIntrusiveList.cpp +++ b/Tests/AK/TestIntrusiveList.cpp @@ -15,7 +15,7 @@ public: IntrusiveTestItem() = default; IntrusiveListNode<IntrusiveTestItem> m_list_node; }; -using IntrusiveTestList = IntrusiveList<IntrusiveTestItem, RawPtr<IntrusiveTestItem>, &IntrusiveTestItem::m_list_node>; +using IntrusiveTestList = IntrusiveList<&IntrusiveTestItem::m_list_node>; TEST_CASE(construct) { @@ -91,7 +91,7 @@ public: IntrusiveRefPtrItem() = default; IntrusiveListNode<IntrusiveRefPtrItem, RefPtr<IntrusiveRefPtrItem>> m_list_node; }; -using IntrusiveRefPtrList = IntrusiveList<IntrusiveRefPtrItem, RefPtr<IntrusiveRefPtrItem>, &IntrusiveRefPtrItem::m_list_node>; +using IntrusiveRefPtrList = IntrusiveList<&IntrusiveRefPtrItem::m_list_node>; TEST_CASE(intrusive_ref_ptr_no_ref_leaks) { @@ -138,7 +138,7 @@ public: IntrusiveNonnullRefPtrItem() = default; IntrusiveListNode<IntrusiveNonnullRefPtrItem, NonnullRefPtr<IntrusiveNonnullRefPtrItem>> m_list_node; }; -using IntrusiveNonnullRefPtrList = IntrusiveList<IntrusiveNonnullRefPtrItem, NonnullRefPtr<IntrusiveNonnullRefPtrItem>, &IntrusiveNonnullRefPtrItem::m_list_node>; +using IntrusiveNonnullRefPtrList = IntrusiveList<&IntrusiveNonnullRefPtrItem::m_list_node>; TEST_CASE(intrusive_nonnull_ref_ptr_intrusive) { |