X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fpawns.h;h=673bcfa5060345002effbb8e71d5f8b739c4303b;hb=fcecc5212e42794cba218fc1ffd39cd9da818655;hp=75136c6fe6c0ed3c75f9af1daabe8b934e6029a9;hpb=539051b1e0fb099c0d0da69d20d6a4c2b98a2cb6;p=stockfish diff --git a/src/pawns.h b/src/pawns.h index 75136c6f..673bcfa5 100644 --- a/src/pawns.h +++ b/src/pawns.h @@ -58,9 +58,9 @@ private: Key key; Bitboard passedPawns; - int16_t mgValue, egValue; - int8_t ksStormValue[2], qsStormValue[2]; - uint8_t halfOpenFiles[2]; + int mgValue, egValue; + int ksStormValue[2], qsStormValue[2]; + int halfOpenFiles[2]; }; @@ -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; }