projects
/
stockfish
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46bb6c6
)
Faster Position::move_is_capture() condition
author
Marco Costalba
<mcostalba@gmail.com>
Tue, 5 May 2009 12:55:48 +0000
(14:55 +0200)
committer
Marco Costalba
<mcostalba@gmail.com>
Tue, 5 May 2009 12:55:48 +0000
(14:55 +0200)
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/position.h
patch
|
blob
|
history
diff --git
a/src/position.h
b/src/position.h
index
65bfa25
..
61b164b
100644
(file)
--- a/
src/position.h
+++ b/
src/position.h
@@
-722,10
+722,7
@@
inline bool Position::move_is_capture(Move m) const {
// Move must not be MOVE_NONE !
- return ( !square_is_empty(move_to(m))
- && (color_of_piece_on(move_to(m)) != color_of_piece_on(move_from(m)))
- )
- || move_is_ep(m);
+ return (!square_is_empty(move_to(m)) && !move_is_castle(m)) || move_is_ep(m);
}
#endif // !defined(POSITION_H_INCLUDED)