mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-17 15:46:24 +08:00
Fix compile error with inlines under gcc and Intel
It seems that these compilers do not like inline functions that call a template when template definition is not in scope. So move functions from header to in *.cpp file Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -358,6 +358,24 @@ Bitboard Position::hidden_checkers(Color c) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Position:pinned_pieces() returns a bitboard of all pinned (against the
|
||||||
|
/// king) pieces for the given color.
|
||||||
|
|
||||||
|
Bitboard Position::pinned_pieces(Color c) const {
|
||||||
|
|
||||||
|
return hidden_checkers<true>(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Position:discovered_check_candidates() returns a bitboard containing all
|
||||||
|
/// pieces for the given side which are candidates for giving a discovered
|
||||||
|
/// check.
|
||||||
|
|
||||||
|
Bitboard Position::discovered_check_candidates(Color c) const {
|
||||||
|
|
||||||
|
return hidden_checkers<false>(c);
|
||||||
|
}
|
||||||
|
|
||||||
/// Position::attacks_to() computes a bitboard containing all pieces which
|
/// Position::attacks_to() computes a bitboard containing all pieces which
|
||||||
/// attacks a given square. There are two versions of this function: One
|
/// attacks a given square. There are two versions of this function: One
|
||||||
/// which finds attackers of both colors, and one which only finds the
|
/// which finds attackers of both colors, and one which only finds the
|
||||||
|
|||||||
@@ -566,14 +566,6 @@ inline Bitboard Position::checkers() const {
|
|||||||
return st->checkersBB;
|
return st->checkersBB;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline Bitboard Position::pinned_pieces(Color c) const {
|
|
||||||
return hidden_checkers<true>(c);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline Bitboard Position::discovered_check_candidates(Color c) const {
|
|
||||||
return hidden_checkers<false>(c);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool Position::is_check() const {
|
inline bool Position::is_check() const {
|
||||||
return st->checkersBB != EmptyBoardBB;
|
return st->checkersBB != EmptyBoardBB;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user