mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 03:57:45 +00:00
san.cpp pass position as constant reference
Make a copy of the position when needed instead of passing as a reference. It is cleaner and let us to simplify also Position::print() A small space inflate while there. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
+1
-2
@@ -275,9 +275,8 @@ void Position::print(Move m) const {
|
||||
std::cout << std::endl;
|
||||
if (m != MOVE_NONE)
|
||||
{
|
||||
Position p(*this);
|
||||
std::string col = (color_of_piece_on(move_from(m)) == BLACK ? ".." : "");
|
||||
std::cout << "Move is: " << col << move_to_san(p, m) << std::endl;
|
||||
std::cout << "Move is: " << col << move_to_san(*this, m) << std::endl;
|
||||
}
|
||||
for (Rank rank = RANK_8; rank >= RANK_1; rank--)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user