From 225d89c51bb99c7163bc34ed00180dbd04f9bbec Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Wed, 4 Feb 2009 17:18:12 +0100 Subject: [PATCH] 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 --- src/pawns.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; } -- 2.39.2