Skip to content

Commit

Permalink
Fix static_assert.
Browse files Browse the repository at this point in the history
With a hard-coded true, this declaration has no effect.

closes #3295

No functional change.
  • Loading branch information
ddobbelaere authored and vondele committed Jan 11, 2021
1 parent 87586b3 commit 0266e70
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/movegen.cpp
Expand Up @@ -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);

Expand All @@ -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);
Expand Down

0 comments on commit 0266e70

Please sign in to comment.