diff --git a/src/input/cache/Item.hxx b/src/input/cache/Item.hxx index 40096cb0e..bff42b04a 100644 --- a/src/input/cache/Item.hxx +++ b/src/input/cache/Item.hxx @@ -22,8 +22,8 @@ #include "input/BufferingInputStream.hxx" #include "thread/Mutex.hxx" +#include "util/IntrusiveList.hxx" -#include #include #include @@ -39,15 +39,12 @@ class InputCacheLease; */ class InputCacheItem final : public BufferingInputStream, - public boost::intrusive::list_base_hook>, + public AutoUnlinkIntrusiveListHook, public boost::intrusive::set_base_hook> { const std::string uri; - using LeaseList = - boost::intrusive::list>>, - boost::intrusive::constant_time_size>; + using LeaseList = IntrusiveList; LeaseList leases; LeaseList::iterator next_lease = leases.end(); diff --git a/src/input/cache/Lease.hxx b/src/input/cache/Lease.hxx index a9ee78abd..833d7b601 100644 --- a/src/input/cache/Lease.hxx +++ b/src/input/cache/Lease.hxx @@ -21,8 +21,7 @@ #define MPD_INPUT_CACHE_LEASE_HXX #include "Item.hxx" - -#include +#include "util/IntrusiveList.hxx" #include @@ -30,7 +29,7 @@ * A lease for an #InputCacheItem. */ class InputCacheLease - : public boost::intrusive::list_base_hook> + : public IntrusiveListHook { InputCacheItem *item = nullptr; diff --git a/src/input/cache/Manager.hxx b/src/input/cache/Manager.hxx index fce37b7b9..408354eb2 100644 --- a/src/input/cache/Manager.hxx +++ b/src/input/cache/Manager.hxx @@ -21,9 +21,9 @@ #define MPD_INPUT_CACHE_MANAGER_HXX #include "thread/Mutex.hxx" +#include "util/IntrusiveList.hxx" #include -#include class InputStream; class InputCacheItem; @@ -55,9 +55,7 @@ class InputCacheManager { const InputCacheItem &b) const noexcept; }; - boost::intrusive::list>>, - boost::intrusive::constant_time_size> items_by_time; + IntrusiveList items_by_time; using UriMap = boost::intrusive::set