1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 16:53:09 +00: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:
Marco Costalba 2009-02-04 17:18:12 +01:00
parent 8bef9e59a0
commit 225d89c51b

View file

@ -121,9 +121,10 @@ inline bool PawnInfo::has_open_file_to_right(Color c, File f) const {
inline void PawnInfo::clear() {
Key k = key;
memset(this, 0, sizeof(PawnInfo));
key = k;
passedPawns = EmptyBoardBB;
mgValue = egValue = 0;
ksStormValue[WHITE] = ksStormValue[BLACK] = 0;
qsStormValue[WHITE] = qsStormValue[BLACK] = 0;
halfOpenFiles[WHITE] = halfOpenFiles[BLACK] = 0xFF;
}