Skip to content

Commit 68a650e

Browse files
authored
removed asserts (#43)
note: UB anyways if undoMove on empty game
1 parent 71907da commit 68a650e

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

position.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,6 @@ template <typename PieceC = EnginePiece, typename = std::enable_if_t<is_piece_en
168168
}
169169
template <bool Strict = true> void doMove(const Move &move);
170170
template <bool RetAll = false> inline auto undoMove() -> std::conditional_t<RetAll, HistoryEntry<PieceC> &, void> {
171-
assert(!history.empty() && "undoMove called with empty history");
172-
173-
// Restore previous state from history
174-
assert(current_state.mv.is_ok() && "Corrupted history entry");
175171
pieces_list[current_state.incr_sqs[0]] = current_state.incr_pc[0];
176172
pieces_list[current_state.incr_sqs[1]] = current_state.incr_pc[1];
177173
pieces_list[current_state.incr_sqs[2]] = current_state.incr_pc[2];

0 commit comments

Comments
 (0)