X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fucioption.cpp;h=1dfc474a9c0a3098ce82e0aa181dfb1bfa89195a;hp=8031ff15d855bf233ec3f54055268a6f9ffad440;hb=ce619b3b6ceb96bbf1e90f8281fdc89b9e64ec5e;hpb=0bf475ec55cf39e6b6959d715ce20aa8df41f621 diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 8031ff15..1dfc474a 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -50,9 +50,8 @@ bool CaseInsensitiveLess::operator() (const string& s1, const string& s2) const } -// stringify() converts a numeric value of type T to a std::string -template -static string stringify(const T& v) { +// An helper to convert an integer value to a std::string +static string int_to_string(int v) { std::ostringstream ss; ss << v; @@ -74,8 +73,6 @@ OptionsMap::OptionsMap() { o["Best Book Move"] = UCIOption(false); o["Mobility (Middle Game)"] = UCIOption(100, 0, 200); o["Mobility (Endgame)"] = UCIOption(100, 0, 200); - o["Pawn Structure (Middle Game)"] = UCIOption(100, 0, 200); - o["Pawn Structure (Endgame)"] = UCIOption(100, 0, 200); o["Passed Pawns (Middle Game)"] = UCIOption(100, 0, 200); o["Passed Pawns (Endgame)"] = UCIOption(100, 0, 200); o["Space"] = UCIOption(100, 0, 200); @@ -90,7 +87,7 @@ OptionsMap::OptionsMap() { o["Ponder"] = UCIOption(true); o["OwnBook"] = UCIOption(true); o["MultiPV"] = UCIOption(1, 1, 500); - o["Skill level"] = UCIOption(20, 0, 20); + o["Skill Level"] = UCIOption(20, 0, 20); o["Emergency Move Horizon"] = UCIOption(40, 0, 50); o["Emergency Base Time"] = UCIOption(200, 0, 30000); o["Emergency Move Time"] = UCIOption(70, 0, 5000); @@ -102,10 +99,10 @@ OptionsMap::OptionsMap() { UCIOption& thr = o["Threads"]; UCIOption& msd = o["Minimum Split Depth"]; - thr.defaultValue = thr.currentValue = stringify(cpu_count()); + thr.defaultValue = thr.currentValue = int_to_string(cpu_count()); if (cpu_count() >= 8) - msd.defaultValue = msd.currentValue = stringify(7); + msd.defaultValue = msd.currentValue = int_to_string(7); } @@ -144,7 +141,7 @@ UCIOption::UCIOption(bool def, string t) : type(t), minValue(0), maxValue(0), id { defaultValue = currentValue = (def ? "true" : "false"); } UCIOption::UCIOption(int def, int minv, int maxv) : type("spin"), minValue(minv), maxValue(maxv), idx(Options.size()) -{ defaultValue = currentValue = stringify(def); } +{ defaultValue = currentValue = int_to_string(def); } /// set_value() updates currentValue of the Option object. Normally it's up to