summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2020-10-18 19:31:58 +0200
committerMax Kellermann <max@musicpd.org>2020-10-18 20:02:47 +0200
commite3270dfd68b0c97b8ce94d826a6072860277ee16 (patch)
treebc472526ae48982744b85f348ff0d305d87208f0
parenta14997ffb8db6dc363151f628c823991895de34a (diff)
event/SocketEvent: use class IntrusiveList<>
-rw-r--r--src/event/Loop.hxx5
-rw-r--r--src/event/SocketEvent.hxx6
2 files changed, 4 insertions, 7 deletions
diff --git a/src/event/Loop.hxx b/src/event/Loop.hxx
index fc6efcdef..9f6f38308 100644
--- a/src/event/Loop.hxx
+++ b/src/event/Loop.hxx
@@ -91,10 +91,7 @@ class EventLoop final
DeferredList deferred;
#endif
- using SocketList =
- boost::intrusive::list<SocketEvent,
- boost::intrusive::base_hook<boost::intrusive::list_base_hook<boost::intrusive::link_mode<boost::intrusive::auto_unlink>>>,
- boost::intrusive::constant_time_size<false>>;
+ using SocketList = IntrusiveList<SocketEvent>;
/**
* A list of scheduled #SocketEvent instances, without those
diff --git a/src/event/SocketEvent.hxx b/src/event/SocketEvent.hxx
index 01a571410..0ccb7557a 100644
--- a/src/event/SocketEvent.hxx
+++ b/src/event/SocketEvent.hxx
@@ -23,8 +23,7 @@
#include "PollGroup.hxx"
#include "net/SocketDescriptor.hxx"
#include "util/BindMethod.hxx"
-
-#include <boost/intrusive/list_hook.hpp>
+#include "util/IntrusiveList.hxx"
#include <cassert>
#include <cstddef>
@@ -45,8 +44,9 @@ class EventLoop;
* thread that runs the #EventLoop, except where explicitly documented
* as thread-safe.
*/
-class SocketEvent final : public boost::intrusive::list_base_hook<boost::intrusive::link_mode<boost::intrusive::auto_unlink>> {
+class SocketEvent final : IntrusiveListHook {
friend class EventLoop;
+ friend class IntrusiveList<SocketEvent>;
EventLoop &loop;