X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.h;h=01a9d6e93c48acd02495b5404f59a585e933ca71;hp=95575184c9554279c72793b9787e698244e289dd;hb=67aac4889ea3bfa5880883d8b81dbb457741b7c2;hpb=aaad48464bc8a269634de371238826d09a6e240d 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; }