]> git.sesse.net Git - stockfish/blobdiff - src/position.h
Use 'adjacent' instead of 'neighboring'
[stockfish] / src / position.h
index 8826fa201161cfd9182502d1148b2105a410f106..c391d8247c72f4530d78d942a1d087eb1d472180 100644 (file)
@@ -210,7 +210,7 @@ private:
   // Initialization helper functions (used while setting up a position)
   void clear();
   void put_piece(Piece p, Square s);
-  void set_castle_right(Square ksq, Square rsq);
+  void set_castle_right(Color c, Square rsq);
   bool move_is_legal(const Move m) const;
 
   // Helper template functions
@@ -392,7 +392,7 @@ inline Bitboard Position::pinned_pieces() const {
 }
 
 inline bool Position::pawn_is_passed(Color c, Square s) const {
-  return !(pieces(PAWN, flip(c)) & passed_pawn_mask(c, s));
+  return !(pieces(PAWN, ~c) & passed_pawn_mask(c, s));
 }
 
 inline Key Position::key() const {