Always have counterMoves associated

Simplifies away all associated checks, leading to a ~0.5% speedup.
The code now explicitly checks if moves are OK, rather than using nullptr checks.

Verified for no regression:

LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 32218 W: 5762 L: 5660 D: 20796

No functional change

Closes #1021
This commit is contained in:
Joost VandeVondele
2017-03-08 18:35:23 -08:00
committed by Joona Kiiski
parent cc76524c2e
commit d490bb9973
3 changed files with 26 additions and 29 deletions

View File

@@ -377,7 +377,7 @@ void Position::set_state(StateInfo* si) const {
/// Position::set() is an overload to initialize the position object with
/// the given endgame code string like "KBPKN". It is manily an helper to
/// the given endgame code string like "KBPKN". It is mainly a helper to
/// get the material key out of an endgame code. Position is not playable,
/// indeed is even not guaranteed to be legal.