From 7feefe9d5c922481081d31b12e02f42d9e028ef9 Mon Sep 17 00:00:00 2001 From: aqua Date: Wed, 1 May 2024 11:17:07 +0300 Subject: Drop python-kcofiglib build time dependency --- lib/configuration/init_global.cpp.in | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lib/configuration/init_global.cpp.in (limited to 'lib/configuration/init_global.cpp.in') diff --git a/lib/configuration/init_global.cpp.in b/lib/configuration/init_global.cpp.in new file mode 100644 index 0000000..9179130 --- /dev/null +++ b/lib/configuration/init_global.cpp.in @@ -0,0 +1,25 @@ +/* + * This is a generated file. + * + * This file is part of smolbote. It's copyrighted by the contributors recorded + * in the version control history of the file, available from its original + * location: https://neueland.iserlohn-fortress.net/cgit/smolbote.git + * + * SPDX-License-Identifier: GPL-3.0 + */ + +#include "configuration.h" + +std::string Configuration::init_global(const std::string &p_path) +{ + auto value_map = std::make_unique>>({ + /* @__DEFAULT_CFG__ */ + }); + + // load the actual configuration file + const auto cfgpath = p_path.empty() ? value_map->value("poi/config").value() : p_path; + value_map->read_file(cfgpath); + + move_global(std::move(value_map)); + return cfgpath; +} -- cgit v1.2.1