mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 10:57:43 +00:00
Triviality in struct PieceLetters
And little touches in search() too. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
+11
-8
@@ -101,20 +101,23 @@ namespace {
|
||||
operator[]('B') = WB; operator[]('b') = BB;
|
||||
operator[]('N') = WN; operator[]('n') = BN;
|
||||
operator[]('P') = WP; operator[]('p') = BP;
|
||||
operator[](' ') = PIECE_NONE; operator[]('.') = PIECE_NONE_DARK_SQ;
|
||||
operator[](' ') = PIECE_NONE;
|
||||
operator[]('.') = PIECE_NONE_DARK_SQ;
|
||||
}
|
||||
|
||||
char from_piece(Piece p) const {
|
||||
|
||||
std::map<char, Piece>::const_iterator it;
|
||||
for (it = begin(); it != end(); ++it)
|
||||
if (it->second == p)
|
||||
return it->first;
|
||||
std::map<char, Piece>::const_iterator it;
|
||||
for (it = begin(); it != end(); ++it)
|
||||
if (it->second == p)
|
||||
return it->first;
|
||||
|
||||
assert(false);
|
||||
return 0;
|
||||
assert(false);
|
||||
return 0;
|
||||
}
|
||||
} pieceLetters;
|
||||
};
|
||||
|
||||
PieceLetters pieceLetters;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user