mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 09:47:46 +00:00
Retire Position::move_is_legal()
Use the new contains() method of struct MoveList No functional change.
This commit is contained in:
+4
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user