]> git.sesse.net Git - stockfish/commitdiff
Some small changes
authormstembera <MissingEmail@email>
Sun, 1 Apr 2018 00:32:17 +0000 (02:32 +0200)
committerStéphane Nicolet <cassio@free.fr>
Sun, 1 Apr 2018 00:32:55 +0000 (02:32 +0200)
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.

src/bitboard.cpp
src/search.h

index 994ee17f26fa8b078e636f0378ec6ad44fe43e70..b19d401af19ad6e13bf36071cdba05cbca9bca5f 100644 (file)
@@ -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;
index 671e1277d7346de0b7578eb9e8d594088eb5f059..8638a9276f0abf1dec43465caf758dcdab6f8b5f 100644 (file)
@@ -81,8 +81,9 @@ typedef std::vector<RootMove> 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 {