mirror of
https://github.com/sockspls/badfish
synced 2025-07-11 19:49:14 +00:00
More use of memset() in Position::clear()
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
e4fc957898
commit
e01fefbbaf
1 changed files with 4 additions and 6 deletions
|
@ -1464,19 +1464,17 @@ void Position::clear() {
|
|||
memset(st, 0, sizeof(StateInfo));
|
||||
st->epSquare = SQ_NONE;
|
||||
|
||||
memset(index, 0, sizeof(int) * 64);
|
||||
memset(byColorBB, 0, sizeof(Bitboard) * 2);
|
||||
memset(byColorBB, 0, sizeof(Bitboard) * 2);
|
||||
memset(byTypeBB, 0, sizeof(Bitboard) * 8);
|
||||
memset(pieceCount, 0, sizeof(int) * 2 * 8);
|
||||
memset(index, 0, sizeof(int) * 64);
|
||||
|
||||
for (int i = 0; i < 64; i++)
|
||||
board[i] = EMPTY;
|
||||
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
byTypeBB[i] = EmptyBoardBB;
|
||||
pieceCount[0][i] = pieceCount[1][i] = 0;
|
||||
for (int j = 0; j < 8; j++)
|
||||
pieceList[0][i][j] = pieceList[1][i][j] = SQ_NONE;
|
||||
}
|
||||
|
||||
sideToMove = WHITE;
|
||||
gamePly = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue