From: mstembera Date: Sun, 1 Apr 2018 00:32:17 +0000 (+0200) Subject: Some small changes X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=76f9cd4df1292ffa919e039edcfb8069f576e698;hp=d9cac9a41492c3e54f3bb471606ec3a922a8ea0f Some small changes 1) Use make_bitboard() in Bitboards::init() 2) Fix MSVC warning: search.h(85): warning C4244: '=': conversion from 'TimePoint' to 'int', possible loss of data. Closes https://github.com/official-stockfish/Stockfish/pull/1524 No functional change. --- diff --git a/src/bitboard.cpp b/src/bitboard.cpp index 994ee17f..b19d401a 100644 --- a/src/bitboard.cpp +++ b/src/bitboard.cpp @@ -89,7 +89,7 @@ void Bitboards::init() { PopCnt16[i] = (uint8_t) popcount16(i); for (Square s = SQ_A1; s <= SQ_H8; ++s) - SquareBB[s] = 1ULL << s; + SquareBB[s] = make_bitboard(s); for (File f = FILE_A; f <= FILE_H; ++f) FileBB[f] = f > FILE_A ? FileBB[f - 1] << 1 : FileABB; diff --git a/src/search.h b/src/search.h index 671e1277..8638a927 100644 --- a/src/search.h +++ b/src/search.h @@ -81,8 +81,9 @@ typedef std::vector RootMoves; struct LimitsType { LimitsType() { // Init explicitly due to broken value-initialization of non POD in MSVC - nodes = time[WHITE] = time[BLACK] = inc[WHITE] = inc[BLACK] = - npmsec = movestogo = depth = movetime = mate = perft = infinite = 0; + time[WHITE] = time[BLACK] = inc[WHITE] = inc[BLACK] = npmsec = movetime = TimePoint(0); + movestogo = depth = mate = perft = infinite = 0; + nodes = 0; } bool use_time_management() const {