From c9c3c1ff7fc432915efe79037f3394889ece8a32 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Mon, 2 Oct 2023 17:01:57 +0200 Subject: [PATCH] update for new entt --- solanaceae/zox/ngc_hs.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/solanaceae/zox/ngc_hs.cpp b/solanaceae/zox/ngc_hs.cpp index 3a76744..7664806 100644 --- a/solanaceae/zox/ngc_hs.cpp +++ b/solanaceae/zox/ngc_hs.cpp @@ -256,7 +256,8 @@ bool ZoxNGCHistorySync::onEvent(const Events::ZoxNGC_ngch_request& e) { const int64_t sync_delta_offset_ms = int64_t(e.sync_delta) * 1000 * 60; const uint64_t ts_start = std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count() - sync_delta_offset_ms; - auto view = reg.view().use(); + auto view = reg.view(); + view.use(); view.each([&](const Message3 e, const auto&, const auto& c_t, const auto& ts, const auto&, const auto&) { // private if (!_cr.all_of(c_t.c)) { @@ -322,8 +323,9 @@ bool ZoxNGCHistorySync::onEvent(const Events::ZoxNGC_ngch_syncmsg& e) { // find matches Message3 matching_e = entt::null; { - const auto view = reg.view(); - for (const auto ent : view.use()) { + auto view = reg.view(); + view.use(); + for (const auto ent : view) { if (view.get(ent).id != e.message_id) { continue; }