mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-17 07:36:23 +08:00
Retire some unused functions
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -208,7 +208,7 @@ void Position::from_fen(const string& fen, bool isChess960) {
|
||||
if ( ((ss >> col) && (col >= 'a' && col <= 'h'))
|
||||
&& ((ss >> row) && (row == '3' || row == '6')))
|
||||
{
|
||||
st->epSquare = make_square(file_from_char(col), rank_from_char(row));
|
||||
st->epSquare = make_square(File(col - 'a') + FILE_A, Rank(row - '1') + RANK_1);
|
||||
|
||||
// Ignore if no capture is possible
|
||||
Color them = opposite_color(sideToMove);
|
||||
@@ -1913,7 +1913,7 @@ bool Position::is_ok(int* failedStep) const {
|
||||
if (failedStep) *failedStep = 1;
|
||||
|
||||
// Side to move OK?
|
||||
if (!color_is_ok(side_to_move()))
|
||||
if (side_to_move() != WHITE && side_to_move() != BLACK)
|
||||
return false;
|
||||
|
||||
// Are the king squares in the position correct?
|
||||
@@ -1927,10 +1927,10 @@ bool Position::is_ok(int* failedStep) const {
|
||||
|
||||
// Castle files OK?
|
||||
if (failedStep) (*failedStep)++;
|
||||
if (!file_is_ok(initialKRFile))
|
||||
if (!square_is_ok(make_square(initialKRFile, RANK_1)))
|
||||
return false;
|
||||
|
||||
if (!file_is_ok(initialQRFile))
|
||||
if (!square_is_ok(make_square(initialQRFile, RANK_1)))
|
||||
return false;
|
||||
|
||||
// Do both sides have exactly one king?
|
||||
|
||||
Reference in New Issue
Block a user