]> git.sesse.net Git - stockfish/commit
Avoid copy a Position to get a move's san notation
authorMarco Costalba <mcostalba@gmail.com>
Mon, 25 Jan 2010 15:22:50 +0000 (16:22 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 25 Jan 2010 15:22:50 +0000 (16:22 +0100)
commitd844a75d2c12e4888443e47cb7b0effd78d81bb8
treea572250edd8c5465b6afa866217536526b745dce
parentc5e71f515045029f4d89f1302277217b878fa7a4
Avoid copy a Position to get a move's san notation

In move_to_san() we create by copy a new position just
to detect if move gives check. This could be very costly in
line_to_san() that calls move_to_san() for every move, so
create the position only once and pass a reference to move_to_san()

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/position.cpp
src/san.cpp
src/san.h