]> git.sesse.net Git - stockfish/blobdiff - src/pawns.h
Space inflate pawns.cpp
[stockfish] / src / pawns.h
index 95575184c9554279c72793b9787e698244e289dd..01a9d6e93c48acd02495b5404f59a585e933ca71 100644 (file)
@@ -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;
 }