summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2021-09-09 16:30:59 +0430
committerIdan Horowitz <idan.horowitz@gmail.com>2021-09-10 18:05:46 +0300
commit5a0cdb15b07ef87cbab6203fad8c0dcea3634f67 (patch)
treec7d38b2113aa030893f1f22560faf8e288f00940 /Userland
parent93cf01ad7db21ec5f48a46e206356ea791158fca (diff)
downloadserenity-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 'Userland')
-rw-r--r--Userland/Libraries/LibC/mallocdefs.h2
-rw-r--r--Userland/Libraries/LibCore/Object.cpp4
-rw-r--r--Userland/Libraries/LibCore/Object.h2
-rw-r--r--Userland/Libraries/LibGUI/MouseTracker.h2
-rw-r--r--Userland/Libraries/LibJS/Heap/CellAllocator.h2
-rw-r--r--Userland/Libraries/LibJS/Heap/Handle.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/MarkedValueList.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/WeakContainer.h2
-rw-r--r--Userland/Services/WindowServer/Compositor.h2
-rw-r--r--Userland/Services/WindowServer/Window.h2
10 files changed, 11 insertions, 11 deletions
diff --git a/Userland/Libraries/LibC/mallocdefs.h b/Userland/Libraries/LibC/mallocdefs.h
index a4aad0e132..da4c8c61a5 100644
--- a/Userland/Libraries/LibC/mallocdefs.h
+++ b/Userland/Libraries/LibC/mallocdefs.h
@@ -75,5 +75,5 @@ struct ChunkedBlock : public CommonHeader {
size_t used_chunks() const { return chunk_capacity() - m_free_chunks; }
size_t chunk_capacity() const { return (block_size - sizeof(ChunkedBlock)) / m_size; }
- using List = IntrusiveList<ChunkedBlock, RawPtr<ChunkedBlock>, &ChunkedBlock::m_list_node>;
+ using List = IntrusiveList<&ChunkedBlock::m_list_node>;
};
diff --git a/Userland/Libraries/LibCore/Object.cpp b/Userland/Libraries/LibCore/Object.cpp
index 088c465515..8df07836c0 100644
--- a/Userland/Libraries/LibCore/Object.cpp
+++ b/Userland/Libraries/LibCore/Object.cpp
@@ -14,9 +14,9 @@
namespace Core {
-IntrusiveList<Object, RawPtr<Object>, &Object::m_all_objects_list_node>& Object::all_objects()
+IntrusiveList<&Object::m_all_objects_list_node>& Object::all_objects()
{
- static IntrusiveList<Object, RawPtr<Object>, &Object::m_all_objects_list_node> objects;
+ static IntrusiveList<&Object::m_all_objects_list_node> objects;
return objects;
}
diff --git a/Userland/Libraries/LibCore/Object.h b/Userland/Libraries/LibCore/Object.h
index 01b12e509b..6fbbf1918d 100644
--- a/Userland/Libraries/LibCore/Object.h
+++ b/Userland/Libraries/LibCore/Object.h
@@ -137,7 +137,7 @@ public:
JsonValue property(String const& name) const;
const HashMap<String, NonnullOwnPtr<Property>>& properties() const { return m_properties; }
- static IntrusiveList<Object, RawPtr<Object>, &Object::m_all_objects_list_node>& all_objects();
+ static IntrusiveList<&Object::m_all_objects_list_node>& all_objects();
void dispatch_event(Core::Event&, Object* stay_within = nullptr);
diff --git a/Userland/Libraries/LibGUI/MouseTracker.h b/Userland/Libraries/LibGUI/MouseTracker.h
index 0897106248..f22e60f1f9 100644
--- a/Userland/Libraries/LibGUI/MouseTracker.h
+++ b/Userland/Libraries/LibGUI/MouseTracker.h
@@ -26,7 +26,7 @@ protected:
private:
IntrusiveListNode<MouseTracker> m_list_node;
- using List = IntrusiveList<MouseTracker, RawPtr<MouseTracker>, &MouseTracker::m_list_node>;
+ using List = IntrusiveList<&MouseTracker::m_list_node>;
static List s_trackers;
};
diff --git a/Userland/Libraries/LibJS/Heap/CellAllocator.h b/Userland/Libraries/LibJS/Heap/CellAllocator.h
index 9ce1488601..43edfe69ff 100644
--- a/Userland/Libraries/LibJS/Heap/CellAllocator.h
+++ b/Userland/Libraries/LibJS/Heap/CellAllocator.h
@@ -43,7 +43,7 @@ public:
private:
const size_t m_cell_size;
- using BlockList = IntrusiveList<HeapBlock, RawPtr<HeapBlock>, &HeapBlock::m_list_node>;
+ using BlockList = IntrusiveList<&HeapBlock::m_list_node>;
BlockList m_full_blocks;
BlockList m_usable_blocks;
};
diff --git a/Userland/Libraries/LibJS/Heap/Handle.h b/Userland/Libraries/LibJS/Heap/Handle.h
index b9eab8a225..07d01941ab 100644
--- a/Userland/Libraries/LibJS/Heap/Handle.h
+++ b/Userland/Libraries/LibJS/Heap/Handle.h
@@ -35,7 +35,7 @@ private:
IntrusiveListNode<HandleImpl> m_list_node;
public:
- using List = IntrusiveList<HandleImpl, RawPtr<HandleImpl>, &HandleImpl::m_list_node>;
+ using List = IntrusiveList<&HandleImpl::m_list_node>;
};
template<class T>
diff --git a/Userland/Libraries/LibJS/Runtime/MarkedValueList.h b/Userland/Libraries/LibJS/Runtime/MarkedValueList.h
index 86419255b1..a3ec8bf9db 100644
--- a/Userland/Libraries/LibJS/Runtime/MarkedValueList.h
+++ b/Userland/Libraries/LibJS/Runtime/MarkedValueList.h
@@ -39,7 +39,7 @@ private:
IntrusiveListNode<MarkedValueList> m_list_node;
public:
- using List = IntrusiveList<MarkedValueList, RawPtr<MarkedValueList>, &MarkedValueList::m_list_node>;
+ using List = IntrusiveList<&MarkedValueList::m_list_node>;
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/WeakContainer.h b/Userland/Libraries/LibJS/Runtime/WeakContainer.h
index 4ac251279f..8e469fb9ed 100644
--- a/Userland/Libraries/LibJS/Runtime/WeakContainer.h
+++ b/Userland/Libraries/LibJS/Runtime/WeakContainer.h
@@ -27,7 +27,7 @@ private:
IntrusiveListNode<WeakContainer> m_list_node;
public:
- using List = IntrusiveList<WeakContainer, RawPtr<WeakContainer>, &WeakContainer::m_list_node>;
+ using List = IntrusiveList<&WeakContainer::m_list_node>;
};
}
diff --git a/Userland/Services/WindowServer/Compositor.h b/Userland/Services/WindowServer/Compositor.h
index 4d7f9a4d7f..bb11f73056 100644
--- a/Userland/Services/WindowServer/Compositor.h
+++ b/Userland/Services/WindowServer/Compositor.h
@@ -220,7 +220,7 @@ private:
bool m_invalidated_cursor { false };
bool m_overlay_rects_changed { false };
- IntrusiveList<Overlay, RawPtr<Overlay>, &Overlay::m_list_node> m_overlay_list;
+ IntrusiveList<&Overlay::m_list_node> m_overlay_list;
Gfx::DisjointRectSet m_overlay_rects;
Gfx::DisjointRectSet m_dirty_screen_rects;
Gfx::DisjointRectSet m_opaque_wallpaper_rects;
diff --git a/Userland/Services/WindowServer/Window.h b/Userland/Services/WindowServer/Window.h
index 4d5c7771be..edf8669095 100644
--- a/Userland/Services/WindowServer/Window.h
+++ b/Userland/Services/WindowServer/Window.h
@@ -469,7 +469,7 @@ private:
RefPtr<Animation> m_animation;
public:
- using List = IntrusiveList<Window, RawPtr<Window>, &Window::m_list_node>;
+ using List = IntrusiveList<&Window::m_list_node>;
};
}