X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fucioption.cpp;h=bf9b5c0f59d5a7b53f4fd554e68f5cb889346639;hb=9bee5f51d811fb5c2e11a94b4e111a69b87855a2;hp=84bcc832fad496bce50ba8e13b38e870799f9ec6;hpb=85477983452271946ef2dfa5cc8aad0aa841bb97;p=stockfish diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 84bcc832..bf9b5c0f 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,147 +29,86 @@ 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