mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:07:35 +00:00
Everywhere: Rename ASSERT => VERIFY
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
This commit is contained in:
parent
b33a6a443e
commit
5d180d1f99
725 changed files with 3448 additions and 3448 deletions
|
@ -41,10 +41,10 @@ void ChessEngine::handle_uci()
|
|||
void ChessEngine::handle_position(const PositionCommand& command)
|
||||
{
|
||||
// FIXME: Implement fen board position.
|
||||
ASSERT(!command.fen().has_value());
|
||||
VERIFY(!command.fen().has_value());
|
||||
m_board = Chess::Board();
|
||||
for (auto& move : command.moves()) {
|
||||
ASSERT(m_board.apply_move(move));
|
||||
VERIFY(m_board.apply_move(move));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ void ChessEngine::handle_go(const GoCommand& command)
|
|||
{
|
||||
// FIXME: A better algorithm than naive mcts.
|
||||
// FIXME: Add different ways to terminate search.
|
||||
ASSERT(command.movetime.has_value());
|
||||
VERIFY(command.movetime.has_value());
|
||||
|
||||
srand(arc4random());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue