blob: f509eb2c430be59e3d13d01b6413936cc6baca93 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/*
* 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/gitea/aqua/smolbote
*
* SPDX-License-Identifier: GPL-3.0
*/
#include "configuration.h"
#include <fstream>
#mesondefine CONFIG_POI_NAME
#mesondefine CONFIG_POI_ICON
#mesondefine CONFIG_POI_CFG_PATH
#mesondefine CONFIG_QTBUG_65223
inline void init_conf(const std::string &path)
{
std::fstream fs;
fs.open(path, std::fstream::in);
assert(fs.is_open());
auto value_map = std::make_unique<Configuration, std::initializer_list<std::pair<std::string, conf_value_t>>>({
@conf_init_list@
});
value_map->read(fs);
Configuration::move_global(std::move(value_map));
fs.close();
}
|