build: Fix position.cpp:1546:9: warning: declaration of ‘count’ shadows a member of ‘Position’ [-Wshadow]

This commit is contained in:
Calcitem 2020-11-01 11:52:09 +08:00
parent b5d257cae6
commit 875bba4852
1 changed files with 3 additions and 3 deletions

View File

@ -1543,7 +1543,7 @@ int Position::surrounded_empty_squares_count(Square s, bool includeFobidden)
{
//assert(rule->hasBannedLocations == includeFobidden);
int count = 0;
int n = 0;
if (pieceCountOnBoard[sideToMove] > rule->nPiecesAtLeast ||
!rule->allowFlyWhenRemainThreePieces) {
@ -1553,13 +1553,13 @@ int Position::surrounded_empty_squares_count(Square s, bool includeFobidden)
if (moveSquare) {
if (board[moveSquare] == 0x00 ||
(includeFobidden && board[moveSquare] == BAN_STONE)) {
count++;
n++;
}
}
}
}
return count;
return n;
}
void Position::surrounded_pieces_count(Square s, int &nOurPieces, int &nTheirPieces, int &nBanned, int &nEmpty)