From 4d4fb83cc2f52cecbbfff04aed28f3c7231222fb Mon Sep 17 00:00:00 2001 From: Samuel Gaist Date: Wed, 16 Jul 2025 18:02:32 +0200 Subject: [PATCH] refactor(unit_tests): move initialization to initialization list Signed-off-by: Samuel Gaist --- unit_tests/test_falco_engine.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/unit_tests/test_falco_engine.cpp b/unit_tests/test_falco_engine.cpp index 38b7dcb6..90f3a395 100644 --- a/unit_tests/test_falco_engine.cpp +++ b/unit_tests/test_falco_engine.cpp @@ -1,10 +1,11 @@ #include "test_falco_engine.h" -test_falco_engine::test_falco_engine() { +test_falco_engine::test_falco_engine(): + m_engine(std::make_shared()) +{ // create a falco engine ready to load the ruleset m_filter_factory = std::make_shared(&m_inspector, m_filterlist); m_formatter_factory = std::make_shared(&m_inspector, m_filterlist); - m_engine = std::make_shared(); m_engine->add_source(m_sample_source, m_filter_factory, m_formatter_factory); }