diff --git a/src/event/FineTimerEvent.hxx b/src/event/FineTimerEvent.hxx index 65781f947..ad792f7dc 100644 --- a/src/event/FineTimerEvent.hxx +++ b/src/event/FineTimerEvent.hxx @@ -7,12 +7,7 @@ #include "Chrono.hxx" #include "event/Features.h" #include "util/BindMethod.hxx" - -#ifdef NO_BOOST -#include "util/IntrusiveList.hxx" -#else #include "util/IntrusiveTreeSet.hxx" -#endif #include @@ -30,16 +25,9 @@ class EventLoop; * as thread-safe. */ class FineTimerEvent final : -#ifdef NO_BOOST - AutoUnlinkIntrusiveListHook -#else public IntrusiveTreeSetHook -#endif { friend class TimerList; -#ifdef NO_BOOST - friend struct IntrusiveListBaseHookTraits; -#endif EventLoop &loop; @@ -105,9 +93,7 @@ public: void ScheduleEarlier(Event::Duration d) noexcept; void Cancel() noexcept { -#ifdef NO_BOOST if (IsPending()) -#endif unlink(); } diff --git a/src/event/TimerList.cxx b/src/event/TimerList.cxx index 9b134a8a2..e02df0371 100644 --- a/src/event/TimerList.cxx +++ b/src/event/TimerList.cxx @@ -11,17 +11,6 @@ TimerList::GetDue::operator()(const FineTimerEvent &timer) const noexcept return timer.due; } -#ifdef NO_BOOST - -constexpr bool -TimerList::Compare::operator()(const FineTimerEvent &a, - const FineTimerEvent &b) const noexcept -{ - return a.due < b.due; -} - -#endif - TimerList::TimerList() = default; TimerList::~TimerList() noexcept @@ -48,11 +37,7 @@ TimerList::Run(const Event::TimePoint now) noexcept if (timeout > timeout.zero()) return timeout; -#ifdef NO_BOOST - t.Cancel(); -#else timers.pop_front(); -#endif t.Run(); } diff --git a/src/event/TimerList.hxx b/src/event/TimerList.hxx index 513688740..bd230a8bf 100644 --- a/src/event/TimerList.hxx +++ b/src/event/TimerList.hxx @@ -6,12 +6,7 @@ #include "Chrono.hxx" #include "event/Features.h" - -#ifdef NO_BOOST -#include "util/IntrusiveSortedList.hxx" -#else #include "util/IntrusiveTreeSet.hxx" -#endif class FineTimerEvent; @@ -23,20 +18,8 @@ class TimerList final { constexpr Event::TimePoint operator()(const FineTimerEvent &timer) const noexcept; }; -#ifdef NO_BOOST - struct Compare { - constexpr bool operator()(const FineTimerEvent &a, - const FineTimerEvent &b) const noexcept; - }; - - /* when building without Boost, then this is just a sorted - doubly-linked list - this doesn't scale well, but is good - enough for most programs */ - IntrusiveSortedList timers; -#else IntrusiveTreeSet> timers; -#endif public: TimerList(); diff --git a/src/event/meson.build b/src/event/meson.build index 681dfb58e..b4d20f864 100644 --- a/src/event/meson.build +++ b/src/event/meson.build @@ -3,7 +3,6 @@ event_features.set('USE_EVENTFD', is_linux and get_option('eventfd')) event_features.set('USE_SIGNALFD', is_linux and get_option('signalfd')) event_features.set('USE_EPOLL', is_linux and get_option('epoll')) event_features.set('HAVE_THREADED_EVENT_LOOP', true) -event_features.set('NO_BOOST', true) configure_file(output: 'Features.h', configuration: event_features) event_sources = []