diff --git a/AUTHORS b/AUTHORS index 0d157b655..1f0b9e37c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -223,6 +223,7 @@ Ron Britvich (Britvich) rqs Rui Coelho (ruicoelhopedro) rustam-cpp +Ryan Lefkowitz (rlefko) Ryan Hirsch Ryan Schmitt Ryan Takker diff --git a/src/syzygy/tbprobe.cpp b/src/syzygy/tbprobe.cpp index ba808ee4b..b75b6046a 100644 --- a/src/syzygy/tbprobe.cpp +++ b/src/syzygy/tbprobe.cpp @@ -949,8 +949,10 @@ encode_remaining: // groups (similar to what was done earlier for leading group pieces). for (int i = 0; i < d->groupLen[next]; ++i) { - auto f = [&](Square s) { return groupSq[i] > s; }; - auto adjust = std::count_if(squares, groupSq, f); + int adjust = 0; + DISABLE_CLANG_LOOP_VEC + for (Square* sq = squares; sq != groupSq; ++sq) + adjust += groupSq[i] > *sq; n += Binomial[i + 1][groupSq[i] - adjust - 8 * remainingPawns]; }