]> git.sesse.net Git - stockfish/commitdiff
Fix compile error with inlines under gcc and Intel
authorMarco Costalba <mcostalba@gmail.com>
Wed, 4 Mar 2009 22:11:23 +0000 (23:11 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Wed, 4 Mar 2009 23:38:45 +0000 (00:38 +0100)
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>
src/position.cpp
src/position.h

index 71243d063ad21179370f7669f117e796a31125e2..f558d73c67992138f1d96ec12521f8ed26027539 100644 (file)
@@ -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
 /// attacks a given square. There are two versions of this function: One
 /// which finds attackers of both colors, and one which only finds the
index ac63c11c36e612a09aa59b4e779b39bc1c74fb2e..173de0c081c59396996b1d6b1d244e38bc1747d0 100644 (file)
@@ -566,14 +566,6 @@ inline Bitboard Position::checkers() const {
   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 {
   return st->checkersBB != EmptyBoardBB;
 }