mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 17:46:26 +08:00
PawnInfo::clear() retire memset() and fix Ubuntu compile
Go back to original direct assignment, this allows to add an include in pawns.h to teach about memset() This fix a compile error under Ubuntu. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -121,9 +121,10 @@ inline bool PawnInfo::has_open_file_to_right(Color c, File f) const {
|
|||||||
|
|
||||||
inline void PawnInfo::clear() {
|
inline void PawnInfo::clear() {
|
||||||
|
|
||||||
Key k = key;
|
passedPawns = EmptyBoardBB;
|
||||||
memset(this, 0, sizeof(PawnInfo));
|
mgValue = egValue = 0;
|
||||||
key = k;
|
ksStormValue[WHITE] = ksStormValue[BLACK] = 0;
|
||||||
|
qsStormValue[WHITE] = qsStormValue[BLACK] = 0;
|
||||||
halfOpenFiles[WHITE] = halfOpenFiles[BLACK] = 0xFF;
|
halfOpenFiles[WHITE] = halfOpenFiles[BLACK] = 0xFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user