Skip to content

Commit

Permalink
Change type check to convertible instead of equal.
Browse files Browse the repository at this point in the history
We're actually OK as long as the playout amount that we were passed fits.
  • Loading branch information
gcp committed Oct 25, 2017
1 parent 7338973 commit f255e49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/UCTSearch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,8 @@ void UCTSearch::ponder() {
}

void UCTSearch::set_playout_limit(int playouts) {
static_assert(std::is_same<decltype(playouts),
decltype(m_maxplayouts)>::value,
static_assert(std::is_convertible<decltype(playouts),
decltype(m_maxplayouts)>::value,
"Inconsistent types for playout amount.");
if (playouts == 0) {
m_maxplayouts = std::numeric_limits<decltype(m_maxplayouts)>::max();
Expand Down

0 comments on commit f255e49

Please sign in to comment.