o["Threads"] = Option(1, 1, 8);
o["Hash"] = Option(32, 4, 4096);
o["Clear Hash"] = Option(false, BUTTON);
+ o["New Game"] = Option(false, BUTTON);
o["Ponder"] = Option(true);
o["OwnBook"] = Option(true);
o["MultiPV"] = Option(1, 1, 500);
return ret;
}
+ // Specialization for std::string where instruction 'ss >> ret;'
+ // would erroneusly tokenize a string with spaces.
+
+ template<>
+ string get_option_value<string>(const string& optionName) {
+
+ if (options.find(optionName) == options.end())
+ return string();
+
+ return options[optionName].currentValue;
+ }
+
}
////
for (Options::const_iterator it = options.begin(); it != options.end(); ++it)
vec.push_back(it->second);
- std::stable_sort(vec.begin(), vec.end());
+ std::sort(vec.begin(), vec.end());
for (std::vector<Option>::const_iterator it = vec.begin(); it != vec.end(); ++it)
{