mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 01:27:16 +08:00
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.
This commit is contained in:
committed by
Stéphane Nicolet
parent
d9cac9a414
commit
76f9cd4df1
@@ -89,7 +89,7 @@ void Bitboards::init() {
|
|||||||
PopCnt16[i] = (uint8_t) popcount16(i);
|
PopCnt16[i] = (uint8_t) popcount16(i);
|
||||||
|
|
||||||
for (Square s = SQ_A1; s <= SQ_H8; ++s)
|
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)
|
for (File f = FILE_A; f <= FILE_H; ++f)
|
||||||
FileBB[f] = f > FILE_A ? FileBB[f - 1] << 1 : FileABB;
|
FileBB[f] = f > FILE_A ? FileBB[f - 1] << 1 : FileABB;
|
||||||
|
|||||||
@@ -81,8 +81,9 @@ typedef std::vector<RootMove> RootMoves;
|
|||||||
struct LimitsType {
|
struct LimitsType {
|
||||||
|
|
||||||
LimitsType() { // Init explicitly due to broken value-initialization of non POD in MSVC
|
LimitsType() { // Init explicitly due to broken value-initialization of non POD in MSVC
|
||||||
nodes = time[WHITE] = time[BLACK] = inc[WHITE] = inc[BLACK] =
|
time[WHITE] = time[BLACK] = inc[WHITE] = inc[BLACK] = npmsec = movetime = TimePoint(0);
|
||||||
npmsec = movestogo = depth = movetime = mate = perft = infinite = 0;
|
movestogo = depth = mate = perft = infinite = 0;
|
||||||
|
nodes = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool use_time_management() const {
|
bool use_time_management() const {
|
||||||
|
|||||||
Reference in New Issue
Block a user