]> git.sesse.net Git - stockfish/commitdiff
Factor out pieceList updating code
authorDan Schmidt <dfan@dfan.org>
Mon, 29 Jul 2013 15:44:58 +0000 (11:44 -0400)
committerMarco Costalba <mcostalba@gmail.com>
Thu, 1 Aug 2013 13:50:19 +0000 (15:50 +0200)
The new Position methods add_piece, move_piece, and remove_piece
now manage the member variables pieceList, pieceCount, and index,
and 9 blocks of code in Position that used to manipulate those
data structures by hand now call the new methods.

There is a slightly slowdown (< 1%) on Clang and on perft,
but the cleanup compensates the little speed loss.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>

No differences found