db/upnp/Discovery: use class IntrusiveList
This commit is contained in:
parent
aa227cded1
commit
5ebe23e4bb
@ -49,8 +49,8 @@ void
|
||||
UPnPDeviceDirectory::Downloader::Destroy() noexcept
|
||||
{
|
||||
const std::lock_guard<Mutex> protect(parent.mutex);
|
||||
parent.downloaders.erase_and_dispose(parent.downloaders.iterator_to(*this),
|
||||
DeleteDisposer());
|
||||
unlink();
|
||||
delete this;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -28,8 +28,7 @@
|
||||
#include "lib/curl/Request.hxx"
|
||||
#include "thread/Mutex.hxx"
|
||||
#include "event/DeferEvent.hxx"
|
||||
|
||||
#include <boost/intrusive/list.hpp>
|
||||
#include "util/IntrusiveList.hxx"
|
||||
|
||||
#include <list>
|
||||
#include <vector>
|
||||
@ -80,9 +79,8 @@ class UPnPDeviceDirectory final : UpnpCallback {
|
||||
};
|
||||
|
||||
class Downloader final
|
||||
: public boost::intrusive::list_base_hook<boost::intrusive::link_mode<boost::intrusive::normal_link>>,
|
||||
CurlResponseHandler {
|
||||
|
||||
: public IntrusiveListHook, CurlResponseHandler
|
||||
{
|
||||
DeferEvent defer_start_event;
|
||||
|
||||
UPnPDeviceDirectory &parent;
|
||||
@ -132,8 +130,7 @@ class UPnPDeviceDirectory final : UpnpCallback {
|
||||
/**
|
||||
* Protected by #mutex.
|
||||
*/
|
||||
boost::intrusive::list<Downloader,
|
||||
boost::intrusive::constant_time_size<false>> downloaders;
|
||||
IntrusiveList<Downloader> downloaders;
|
||||
|
||||
/**
|
||||
* Protected by #mutex.
|
||||
|
Loading…
Reference in New Issue
Block a user