From: Marco Costalba Date: Wed, 4 Feb 2009 16:18:12 +0000 (+0100) Subject: PawnInfo::clear() retire memset() and fix Ubuntu compile X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=225d89c51bb99c7163bc34ed00180dbd04f9bbec 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 --- diff --git a/src/pawns.h b/src/pawns.h index 75136c6f..7d3e9252 100644 --- a/src/pawns.h +++ b/src/pawns.h @@ -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; }