mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00: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:
parent
7fe1632a49
commit
8c9c51c721
2 changed files with 18 additions and 8 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue