view src/core/ini.cc @ 120:275da698697d

config: template-ify INI now it's... slightly less ugly :')
author Paper <mrpapersonic@gmail.com>
date Wed, 08 Nov 2023 18:13:37 -0500
parents 254b1d2b7096
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
}

}