1
0
Fork 0

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.
pull/3300/head
Dieter Dobbelaere 2021-01-10 12:22:52 +01:00 committed by Joost VandeVondele
parent 87586b3d0c
commit 0266e70297
1 changed files with 3 additions and 2 deletions

View File

@ -204,6 +204,9 @@ namespace {
template<Color Us, GenType Type>
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<Us, Type>(pos, moveList, target);