]> git.sesse.net Git - stockfish/blobdiff - src/position.h
Move kingSquare[] array to StateInfo
[stockfish] / src / position.h
index 11cdc132e97621c6e25a422d2818468a1564da94..8e6fa93876ff1573364f6008b485c45794963293 100644 (file)
@@ -89,7 +89,7 @@ enum Phase {
 struct StateInfo {
   Key key, pawnKey, materialKey;
   int castleRights, rule50;
 struct StateInfo {
   Key key, pawnKey, materialKey;
   int castleRights, rule50;
-  Square epSquare;
+  Square kingSquare[2], epSquare;
   Value mgValue, egValue;
   Value npMaterial[2];
 
   Value mgValue, egValue;
   Value npMaterial[2];
 
@@ -326,7 +326,6 @@ private:
   int index[64]; // [square]
 
   // Other info
   int index[64]; // [square]
 
   // Other info
-  Square kingSquare[2];
   Color sideToMove;
   int gamePly;
   Key history[MaxGameLength];
   Color sideToMove;
   int gamePly;
   Key history[MaxGameLength];
@@ -423,7 +422,7 @@ inline Square Position::ep_square() const {
 }
 
 inline Square Position::king_square(Color c) const {
 }
 
 inline Square Position::king_square(Color c) const {
-  return kingSquare[c];
+  return st->kingSquare[c];
 }
 
 inline bool Position::can_castle_kingside(Color side) const {
 }
 
 inline bool Position::can_castle_kingside(Color side) const {