From 8c9c51c721f01eaf000924f493ced2ab6bec9e91 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Wed, 4 Mar 2009 23:11:23 +0100 Subject: [PATCH] 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 --- src/position.cpp | 18 ++++++++++++++++++ src/position.h | 8 -------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/position.cpp b/src/position.cpp index 71243d06..f558d73c 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -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(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(c); +} + /// Position::attacks_to() computes a bitboard containing all pieces which /// attacks a given square. There are two versions of this function: One /// which finds attackers of both colors, and one which only finds the diff --git a/src/position.h b/src/position.h index ac63c11c..173de0c0 100644 --- a/src/position.h +++ b/src/position.h @@ -566,14 +566,6 @@ inline Bitboard Position::checkers() const { return st->checkersBB; } -inline Bitboard Position::pinned_pieces(Color c) const { - return hidden_checkers(c); -} - -inline Bitboard Position::discovered_check_candidates(Color c) const { - return hidden_checkers(c); -} - inline bool Position::is_check() const { return st->checkersBB != EmptyBoardBB; } -- 2.39.2