summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ca0804d)
Use switch statement also for normal case.
No speed regression.
No functional change.
&& !aligned(from, to, ci.ksq))
return true;
&& !aligned(from, to, ci.ksq))
return true;
- // Can we skip the ugly special cases?
- if (type_of(m) == NORMAL)
- return false;
-
+ case NORMAL:
+ return false;
+
case PROMOTION:
return attacks_bb(Piece(promotion_type(m)), to, pieces() ^ from) & ci.ksq;
case PROMOTION:
return attacks_bb(Piece(promotion_type(m)), to, pieces() ^ from) & ci.ksq;