]> git.sesse.net Git - stockfish/commit
Simplify castlingPath (#2088)
authorprotonspring <mike@whiteley.org>
Wed, 10 Apr 2019 17:33:57 +0000 (11:33 -0600)
committerMarco Costalba <mcostalba@users.noreply.github.com>
Wed, 10 Apr 2019 17:33:57 +0000 (19:33 +0200)
commitec49e676a70435472cb70a9cf0c0376dfab31af4
treee8abe5a0ffd4110f9f63cff159b04cf630823f73
parentab4b94e1737fcdf9f5174a96e80bbdc985c95267
Simplify castlingPath (#2088)

Instead of looping through kfrom,kto, rfrom, rto, we can use BetweenBB. This is less lines of code and it is more clear what castlingPath actually is. Personal benchmarks are all over the place. However, this code is only executed when loading a position, so performance doesn't seem that relevant.

No functional change.
src/position.cpp