X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fucioption.cpp;h=97cbe1a64684da2cddbcc86561bd19a7c1ff6063;hb=6608a16a6a6e062921fe318846c2c21e1fbcd729;hp=2db1beeba31a11305fe7a4cb15ed09e6c62f8a99;hpb=fb50e16cdda68e05d08ed3992a04e5a396a461e3;p=stockfish diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 2db1beeb..97cbe1a6 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -17,17 +17,9 @@ along with this program. If not, see . */ - -//// -//// Includes -//// - -#include -#include -#include -#include +#include +#include #include -#include #include "misc.h" #include "thread.h" @@ -37,150 +29,84 @@ 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; - - 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; } - }; +OptionsMap Options; // Global object - typedef std::vector