Exemple #1
0
void SimpleConfig::setString(const std::string &section, const std::string &key, const std::string &value) {
	ConfigValue *v = _find(section, key);
	if (v) {
		v->setValue(value);
	} else {
		_addValue(section, key, value);
	}
	m_modified = true;
	if (m_autosave) save();
}
Exemple #2
0
void SimpleConfig::setPath(const std::string &section, const std::string &key, const std::string &value) {
	ConfigValue *v = _find(section, key);
	std::string native = ospath::filter(value);
	if (v) {
		v->setValue(native);
	} else {
		_addValue(section, key, native);
	}
	m_modified = true;
	if (m_autosave) save();
}