X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbitboard.cpp;h=3bb3ff8f8d5777ab0aa9ccf9e3928d3e94280051;hp=69bbc77bf309c97da5efc7de95916cdbad9da5e6;hb=d0cb9b286f4d7415be002855201e75340c8adef0;hpb=f83cb95740de019db6ff5567d6f84f218b18cd9e diff --git a/src/bitboard.cpp b/src/bitboard.cpp index 69bbc77b..3bb3ff8f 100644 --- a/src/bitboard.cpp +++ b/src/bitboard.cpp @@ -56,8 +56,9 @@ const std::string Bitboards::pretty(Bitboard b) { for (File f = FILE_A; f <= FILE_H; ++f) s += b & make_square(f, r) ? "| X " : "| "; - s += "|\n+---+---+---+---+---+---+---+---+\n"; + s += "| " + std::to_string(1 + r) + "\n+---+---+---+---+---+---+---+---+\n"; } + s += " a b c d e f g h\n"; return s; } @@ -69,7 +70,7 @@ const std::string Bitboards::pretty(Bitboard b) { void Bitboards::init() { for (unsigned i = 0; i < (1 << 16); ++i) - PopCnt16[i] = std::bitset<16>(i).count(); + PopCnt16[i] = uint8_t(std::bitset<16>(i).count()); for (Square s = SQ_A1; s <= SQ_H8; ++s) SquareBB[s] = (1ULL << s);