From 9a2b58c6f79442399e19276ce5923ee5a07ac616 Mon Sep 17 00:00:00 2001 From: Federico Aponte Date: Sat, 24 Feb 2024 16:28:46 +0100 Subject: [PATCH] refactor: very minor improvement Signed-off-by: Federico Aponte --- userspace/falco/app/actions/process_events.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/userspace/falco/app/actions/process_events.cpp b/userspace/falco/app/actions/process_events.cpp index 24b07808..b5ba8208 100644 --- a/userspace/falco/app/actions/process_events.cpp +++ b/userspace/falco/app/actions/process_events.cpp @@ -488,8 +488,7 @@ falco::app::run_result falco::app::actions::process_events(falco::app::state& s) ctxs.reserve(s.enabled_sources.size()); for (const auto& source : s.enabled_sources) { - ctxs.emplace_back(); - auto& ctx = ctxs[ctxs.size() - 1]; + auto& ctx = ctxs.emplace_back(); ctx.source = source; ctx.sync.reset(new source_sync_context(termination_sem)); auto src_info = s.source_infos.at(source);