view 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 source

#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
}

}