X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fucioption.cpp;h=cc19e23610be28ed6879ff3d5ea095eb1dac031e;hp=d700e6d18e840aef53f2abf888fe98baf843ce42;hb=e5068c4734a9a8ba6f8cdb03ec787b76755d57b2;hpb=6c64f68ccf18a4ee1d4429abbef5fb4c0e216504;ds=sidebyside diff --git a/src/ucioption.cpp b/src/ucioption.cpp index d700e6d1..cc19e236 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -22,7 +22,6 @@ //// #include -#include #include #include #include @@ -53,23 +52,22 @@ namespace { typedef std::vector ComboValues; - struct OptionValue + struct Option { - std::string defaultValue, currentValue; + std::string name, defaultValue, currentValue; OptionType type; int minValue, maxValue; ComboValues comboValues; - // Helper to convert a bool or an int in a std::string + // Helper to convert a bool or an int to a std::string template std::string stringify(const T& v); - OptionValue(); // this is needed to use a std::map - OptionValue(const char* defaultValue, OptionType = STRING); - OptionValue(bool defaultValue); - OptionValue(int defaultValue, int minValue, int maxValue); + Option(const char* name, const char* defaultValue, OptionType = STRING); + Option(const char* name, bool defaultValue); + Option(const char* name, int defaultValue, int minValue, int maxValue); }; - typedef std::map Options; + typedef std::vector