X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fnotation.h;h=12f4cfaa399fe52d46cb78eb4db4c8df54d135f7;hp=251a0caf8ac109df5ff03c1349443e38cfae7d9e;hb=428962a2e8c754311119fa4f66c7c248d63cb2c8;hpb=4f6b1bf3bee68f138d1b5fc234fd25901cffa42c;ds=sidebyside diff --git a/src/notation.h b/src/notation.h index 251a0caf..12f4cfaa 100644 --- a/src/notation.h +++ b/src/notation.h @@ -30,16 +30,8 @@ std::string score_to_uci(Value v, Value alpha = -VALUE_INFINITE, Value beta = VA Move move_from_uci(const Position& pos, std::string& str); const std::string move_to_uci(Move m, bool chess960); -inline char to_char(File f, bool tolower = true) { - return char(f - FILE_A + (tolower ? 'a' : 'A')); -} - -inline char to_char(Rank r) { - return char(r - RANK_1 + '1'); -} - inline const std::string to_string(Square s) { - char ch[] = { to_char(file_of(s)), to_char(rank_of(s)), 0 }; + char ch[] = { 'a' + file_of(s), '1' + rank_of(s), 0 }; return ch; }