mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 03:57:45 +00:00
Use a const pointer-to-member array for attacks
Allow the compiler to optimize member function access. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
+1
-2
@@ -372,8 +372,7 @@ private:
|
||||
|
||||
/// An array of member functions to dispatch attacks_square
|
||||
typedef Bitboard (Position::* Piece_attacks_fn)(Square s) const;
|
||||
extern Piece_attacks_fn piece_attacks_fn[7];
|
||||
extern void init_piece_attacks_fn();
|
||||
extern const Piece_attacks_fn piece_attacks_fn[];
|
||||
|
||||
////
|
||||
//// Inline functions
|
||||
|
||||
Reference in New Issue
Block a user