X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fucioption.cpp;h=9e718c02c89ca8a5670b555ed05ccca93fb9026a;hp=6fdc6e77a1b22f2eccc9128d61a597ede0f23bde;hb=44c78fdb7ad4c82656f25e4da11f3f9d56a4c6aa;hpb=d3260ce70f6a17f9d43d199f0e07488888188f8b diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 6fdc6e77..9e718c02 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -17,17 +17,10 @@ along with this program. If not, see . */ - -//// -//// Includes -//// - #include -#include -#include -#include +#include +#include #include -#include #include "misc.h" #include "thread.h" @@ -37,279 +30,131 @@ using std::string; using std::cout; using std::endl; -//// -//// Local definitions -//// - -namespace { - - enum OptionType { SPIN, COMBO, CHECK, STRING, BUTTON }; - - typedef std::vector StrVector; - - struct Option { - - string name, defaultValue, currentValue; - OptionType type; - size_t idx; - int minValue, maxValue; - StrVector comboValues; +OptionsMap Options; // Global object - Option(); - Option(const char* defaultValue, OptionType = STRING); - Option(bool defaultValue, OptionType = CHECK); - Option(int defaultValue, int minValue, int maxValue); - bool operator<(const Option& o) const { return idx < o.idx; } - }; - - typedef std::vector