X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fucioption.cpp;h=487778e5ad590b007dde1156f9a95eef6c09b559;hp=33db4d15f476af9a5ff438aefdbeb44f2a155bd7;hb=9ba7f701ead00fd4a59841d457d15a15d3b84378;hpb=f40e481fd63d056cbdad78c2c3fcdad0ff3556d9 diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 33db4d15..487778e5 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,85 @@ 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 { +OptionsMap Options; // Global object - 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); +// Our case insensitive less() function as required by UCI protocol +bool CaseInsensitiveLess::operator() (const string& s1, const string& s2) const { - bool operator<(const Option& o) const { return idx < o.idx; } - }; + int c1, c2; + size_t i = 0; - typedef std::vector