diff options
author | Merry <git@mary.rs> | 2023-09-13 23:49:41 +0200 |
---|---|---|
committer | Merry <git@mary.rs> | 2023-09-16 08:42:45 +0200 |
commit | 3ad7eec9de119afa6f5ca2db073070a8cdf62f69 (patch) | |
tree | 4705cadc186386a69697ea3de023a75e8eec2b41 /src/core/core_timing.h | |
parent | vcpkg: Add boost.heap (diff) | |
download | yuzu-3ad7eec9de119afa6f5ca2db073070a8cdf62f69.tar yuzu-3ad7eec9de119afa6f5ca2db073070a8cdf62f69.tar.gz yuzu-3ad7eec9de119afa6f5ca2db073070a8cdf62f69.tar.bz2 yuzu-3ad7eec9de119afa6f5ca2db073070a8cdf62f69.tar.lz yuzu-3ad7eec9de119afa6f5ca2db073070a8cdf62f69.tar.xz yuzu-3ad7eec9de119afa6f5ca2db073070a8cdf62f69.tar.zst yuzu-3ad7eec9de119afa6f5ca2db073070a8cdf62f69.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/core_timing.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/core_timing.h b/src/core/core_timing.h index c20e906fb..26a8b93a7 100644 --- a/src/core/core_timing.h +++ b/src/core/core_timing.h @@ -11,7 +11,8 @@ #include <optional> #include <string> #include <thread> -#include <vector> + +#include <boost/heap/fibonacci_heap.hpp> #include "common/common_types.h" #include "common/thread.h" @@ -151,11 +152,10 @@ private: s64 timer_resolution_ns; #endif - // The queue is a min-heap using std::make_heap/push_heap/pop_heap. - // We don't use std::priority_queue because we need to be able to serialize, unserialize and - // erase arbitrary events (RemoveEvent()) regardless of the queue order. These aren't - // accommodated by the standard adaptor class. - std::vector<Event> event_queue; + using heap_t = + boost::heap::fibonacci_heap<CoreTiming::Event, boost::heap::compare<std::greater<>>>; + + heap_t event_queue; u64 event_fifo_id = 0; std::shared_ptr<EventType> ev_lost; |