double CConfiguration::getValue(const string &varName, double defaultValue) { if (m_ConfigFile.exists(varName)) return m_ConfigFile.getVar(varName).asDouble(); CConfigFile::CVar varToCopy; varToCopy.forceAsDouble(defaultValue); m_ConfigFile.insertVar(varName, varToCopy); return defaultValue; }
float CConfiguration::getValue(const string &varName, float defaultValue) { if (ConfigFile.exists(varName)) return ConfigFile.getVar(varName).asFloat(); CConfigFile::CVar varToCopy; varToCopy.forceAsDouble((double)defaultValue); ConfigFile.insertVar(varName, varToCopy); return defaultValue; }