icinga2/lib/base/initialize.cpp
Julian Brost 99bb687350 INITIALIZE_ONCE_WITH_PRIORITY: use enum for priority values
Change the type of the priority values from int to a new enum. By replacing the
magic int values throughout the code base with named values, there is now a
single place where all priority values are defined and you get an overview over
the initialization order.
2023-01-18 15:57:27 +01:00

14 lines
298 B
C++

/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
#include "base/initialize.hpp"
#include "base/loader.hpp"
using namespace icinga;
bool icinga::InitializeOnceHelper(const std::function<void()>& func, InitializePriority priority)
{
Loader::AddDeferredInitializer(func, priority);
return true;
}