X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fpawns.h;h=01a9d6e93c48acd02495b5404f59a585e933ca71;hb=23490bd825d60564b1368b6a7e3df7d86a772bf0;hp=95575184c9554279c72793b9787e698244e289dd;hpb=5dc23121215039938a9ef4e59ae934312774571c;p=stockfish diff --git a/src/pawns.h b/src/pawns.h index 95575184..01a9d6e9 100644 --- a/src/pawns.h +++ b/src/pawns.h @@ -120,10 +120,10 @@ inline bool PawnInfo::has_open_file_to_right(Color c, File f) const { } inline void PawnInfo::clear() { - mgValue = egValue = 0; - passedPawns = EmptyBoardBB; - ksStormValue[WHITE] = ksStormValue[BLACK] = 0; - qsStormValue[WHITE] = qsStormValue[BLACK] = 0; + + Key k = key; + memset(this, 0, sizeof(PawnInfo)); + key = k; halfOpenFiles[WHITE] = halfOpenFiles[BLACK] = 0xFF; }