]> git.sesse.net Git - stockfish/commit
Get rid of ReducedStateInfo struct
authorMarco Costalba <mcostalba@gmail.com>
Sun, 28 Oct 2012 16:12:40 +0000 (17:12 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 29 Oct 2012 07:07:17 +0000 (08:07 +0100)
commit13f90a30ef4da98722c7167cfb98532fd56a84d6
tree5df4882bef7e431a64dc19c955fe5598e6b2906a
parentad1941fd00ddf766b5c2878730fe63ef6a727654
Get rid of ReducedStateInfo struct

ReducedStateInfo is a redundant struct that is also
prone to errors, indeed must be updated any time is
updated StateInfo. It is a trick to partial copy a
StateInfo object in do_move().

This patch takes advantage of builtin macro offsetof()
to directly calculate the number of quad words to copy.
Note that we still use memcpy to do the actual job of
copying the (48 bytes) of data.

Idea by Richard Vida.

No functional and no performance change.
src/position.cpp
src/position.h