Mercurial > minori
diff src/core/ini.cc @ 116:254b1d2b7096
settings: add torrents page, make rss feed configurable
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Tue, 07 Nov 2023 13:52:13 -0500 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/core/ini.cc Tue Nov 07 13:52:13 2023 -0500 @@ -0,0 +1,13 @@ +#include "core/ini.h" + +namespace INI { + +/* this should be in some ini.cc or whatever */ +std::string GetIniString(const mINI::INIStructure& ini, const std::string& section, + const std::string& value, const std::string& def) { + if (!ini.has(section) || !ini.get(section).has(value)) + return def; + return ini.get(section).get(value); // ack +} + +} \ No newline at end of file