comparison src/core/ini.cc @ 280:9b6e12c14a1e

chore: merge
author Paper <paper@paper.us.eu.org>
date Mon, 06 May 2024 17:23:30 -0400
parents ec0a2b5493f8
children
comparison
equal deleted inserted replaced
279:657fda1b9cac 280:9b6e12c14a1e
1 #include "core/ini.h"
2
3 namespace INI {
4
5 std::string GetIniString(const mINI::INIStructure& ini, const std::string& section, const std::string& key, const std::string& def) {
6 if (!ini.has(section) || !ini.get(section).has(key))
7 return def;
8
9 return ini.get(section).get(key);
10 }
11
12 bool GetIniBool(const mINI::INIStructure& ini, const std::string& section, const std::string& key, bool def) {
13 return Strings::ToBool(GetIniString(ini, section, key, ""), def);
14 }
15
16 }