view include/core/ini.h @ 294:99cbc51433e4

*: cleanup uses of QPalette I didn't know about setBackgroundRole() which is very useful in 99% of the cases where I even needed to edit the palette
author Paper <paper@paper.us.eu.org>
date Sun, 12 May 2024 18:16:08 -0400
parents ec0a2b5493f8
children b1f625b0227c
line wrap: on
line source

#ifndef MINORI_CORE_INI_H_
#define MINORI_CORE_INI_H_

#define MINI_CASE_SENSITIVE
#include "core/strings.h"
#include "mini/ini.h"
#include <string>

namespace INI {

std::string GetIniString(const mINI::INIStructure& ini, const std::string& section, const std::string& key, const std::string& def);
bool GetIniBool(const mINI::INIStructure& ini, const std::string& section, const std::string& key, bool def);

template<typename T>
T GetIniInteger(const mINI::INIStructure& ini, const std::string& section, const std::string& key, T def) {
	return Strings::ToInt<T>(GetIniString(ini, section, key, ""), def);
}

} // namespace INI

#endif