35 AdvancedOptions::const_iterator it = opts.find(name);
39 const std::string value(it->second);
40 if (value ==
"true" || value ==
"1")
54 AdvancedOptions::const_iterator it = opts.find(name);
68 AdvancedOptions::const_iterator it = opts.find(name);
75 return static_cast<float>(value);
bool GetAdvancedOption(const AdvancedOptions &opts, const std::string &name, const bool defaultValue)
check if given option is saved and return its boolean value, otherwise return defaultValue ...
std::string doubleToString(double d, int digits)
convert a double to a string, suitable for display within a GUI.
Helper class for storing different options.
bool stringToDouble(const STR &str_, double &dest)
convert a string to a double, ignore localisation.
std::map< std::string, std::string > AdvancedOptions
void SetAdvancedOption(AdvancedOptions &opts, const std::string &name, const bool value)
store the option with name in AdvancedOptions