From: Dieter Dobbelaere Date: Sun, 10 Jan 2021 11:22:52 +0000 (+0100) Subject: Fix static_assert. X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=0266e702970640df693a8e572dd3cb9d227cdfc6;ds=inline Fix static_assert. With a hard-coded true, this declaration has no effect. closes https://github.com/official-stockfish/Stockfish/pull/3295 No functional change. --- diff --git a/src/movegen.cpp b/src/movegen.cpp index 5ce2de7c..aaa1ff88 100644 --- a/src/movegen.cpp +++ b/src/movegen.cpp @@ -204,6 +204,9 @@ namespace { template ExtMove* generate_all(const Position& pos, ExtMove* moveList) { + + static_assert(Type != LEGAL, "Unsupported type in generate_all()"); + constexpr bool Checks = Type == QUIET_CHECKS; // Reduce template instantations Bitboard target, piecesToMove = pos.pieces(Us); @@ -228,8 +231,6 @@ namespace { case NON_EVASIONS: target = ~pos.pieces(Us); break; - default: - static_assert(true, "Unsupported type in generate_all()"); } moveList = generate_pawn_moves(pos, moveList, target);