]> git.sesse.net Git - stockfish/commit
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)
commit7b4f5c8f72435cf6b9862ecd445aaf4627cc4f59
treeef71daff0ce7232e185abe1adc4a23e7518be62d
parent55948623e7b8ad1fc6624cd06733b16d295eecb8
Factor out pieceList updating code

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>
src/position.cpp
src/position.h