Retire Position::move_is_legal()

Use the new contains() method of struct MoveList

No functional change.
This commit is contained in:
Marco Costalba
2012-12-25 11:40:28 +01:00
parent 423c6d8a8a
commit 3b49aeb4f2
5 changed files with 10 additions and 19 deletions
+4 -2
View File
@@ -1540,7 +1540,8 @@ void RootMove::extract_pv_from_tt(Position& pos) {
do {
pv.push_back(m);
assert(pos.move_is_legal(pv[ply]));
assert(MoveList<LEGAL>(pos).contains(pv[ply]));
pos.do_move(pv[ply++], *st++);
tte = TT.probe(pos.key());
@@ -1572,7 +1573,8 @@ void RootMove::insert_pv_in_tt(Position& pos) {
if (!tte || tte->move() != pv[ply]) // Don't overwrite correct entries
TT.store(pos.key(), VALUE_NONE, BOUND_NONE, DEPTH_NONE, pv[ply]);
assert(pos.move_is_legal(pv[ply]));
assert(MoveList<LEGAL>(pos).contains(pv[ply]));
pos.do_move(pv[ply++], *st++);
} while (pv[ply] != MOVE_NONE);