]> git.sesse.net Git - stockfish/blobdiff - src/pawns.h
Move halfOpenFiles[] calculation out of a loop
[stockfish] / src / pawns.h
index ba94a72319ef665728206d89aa68ac39e5785c0a..9dc08a669e1a63e24d9f47e2053aa0d3f19061c2 100644 (file)
@@ -58,7 +58,7 @@ public:
   int get_king_shelter(const Position& pos, Color c, Square ksq);
 
 private:
-  inline void clear();
+  void clear();
   int updateShelter(const Position& pos, Color c, Square ksq);
 
   Key key;
@@ -67,7 +67,7 @@ private:
   int16_t ksStormValue[2], qsStormValue[2];
   uint8_t halfOpenFiles[2];
   Square kingSquares[2];
-  int16_t kingShelters[2];
+  uint8_t kingShelters[2];
 };
 
 /// The PawnInfoTable class represents a pawn hash table.  It is basically
@@ -128,15 +128,4 @@ inline int PawnInfo::get_king_shelter(const Position& pos, Color c, Square ksq)
   return (kingSquares[c] == ksq ? kingShelters[c] : updateShelter(pos, c, ksq));
 }
 
-inline void PawnInfo::clear() {
-
-  passedPawns = EmptyBoardBB;
-  mgValue = egValue = 0;
-  ksStormValue[WHITE] = ksStormValue[BLACK] = 0;
-  qsStormValue[WHITE] = qsStormValue[BLACK] = 0;
-  halfOpenFiles[WHITE] = halfOpenFiles[BLACK] = 0xFF;
-  kingSquares[WHITE] = kingSquares[BLACK] = SQ_NONE;
-}
-
-
 #endif // !defined(PAWNS_H_INCLUDED)