Change IniFile::Section::Set() with default value to use a template.

This commit is contained in:
Rachel Bryk
2014-09-04 03:29:49 -04:00
parent 46c18aa909
commit 345b608d64
2 changed files with 11 additions and 27 deletions

View File

@ -60,30 +60,6 @@ void IniFile::Section::Set(const std::string& key, const std::string& newValue,
Delete(key);
}
void IniFile::Section::Set(const std::string& key, const float newValue, const float defaultValue)
{
if (newValue != defaultValue)
Set(key, newValue);
else
Delete(key);
}
void IniFile::Section::Set(const std::string& key, int newValue, int defaultValue)
{
if (newValue != defaultValue)
Set(key, newValue);
else
Delete(key);
}
void IniFile::Section::Set(const std::string& key, bool newValue, bool defaultValue)
{
if (newValue != defaultValue)
Set(key, newValue);
else
Delete(key);
}
void IniFile::Section::Set(const std::string& key, const std::vector<std::string>& newValues)
{
std::string temp;