Retire enum SquareDelta

Use Square instead. At the end is the same because we were
anyway foreseen operators on mixed terms (Square, SquareDelta).

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2011-02-23 10:03:30 +01:00
parent aa40d0a917
commit deb212cb05
5 changed files with 26 additions and 34 deletions
+1 -2
View File
@@ -569,8 +569,7 @@ namespace {
// problem, especially when that pawn is also blocked.
if (s == relative_square(Us, SQ_A1) || s == relative_square(Us, SQ_H1))
{
SquareDelta d = pawn_push(Us)
+ (square_file(s) == FILE_A ? DELTA_E : DELTA_W);
Square d = pawn_push(Us) + (square_file(s) == FILE_A ? DELTA_E : DELTA_W);
if (pos.piece_on(s + d) == piece_of_color_and_type(Us, PAWN))
{
if (!pos.square_is_empty(s + d + pawn_push(Us)))