]> git.sesse.net Git - stockfish/blobdiff - src/pawns.h
PawnInfo::clear() retire memset() and fix Ubuntu compile
[stockfish] / src / pawns.h
index 75136c6fe6c0ed3c75f9af1daabe8b934e6029a9..7d3e92522c83b0f668cdd6262e90190609e4a27f 100644 (file)
@@ -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;
 }