summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e2d3c16)
This custom predicate filter creates an unnecessary abstraction layer, but doesn't make the code any more readable. The code is clear enough without it.
No functional change.
QSEARCH_TT, QCAPTURE_INIT, QCAPTURE, QCHECK_INIT, QCHECK
};
QSEARCH_TT, QCAPTURE_INIT, QCAPTURE, QCHECK_INIT, QCHECK
};
- // Helper filter used with select()
- const auto Any = [](){ return true; };
-
// partial_insertion_sort() sorts moves in descending order up to and including
// a given limit. The order of moves smaller than the limit is left unspecified.
void partial_insertion_sort(ExtMove* begin, ExtMove* end, int limit) {
// partial_insertion_sort() sorts moves in descending order up to and including
// a given limit. The order of moves smaller than the limit is left unspecified.
void partial_insertion_sort(ExtMove* begin, ExtMove* end, int limit) {
/* fallthrough */
case BAD_CAPTURE:
/* fallthrough */
case BAD_CAPTURE:
- return select<Next>(Any);
+ return select<Next>([](){ return true; });
case EVASION_INIT:
cur = moves;
case EVASION_INIT:
cur = moves;
/* fallthrough */
case EVASION:
/* fallthrough */
case EVASION:
- return select<Best>(Any);
+ return select<Best>([](){ return true; });
case PROBCUT:
return select<Best>([&](){ return pos.see_ge(move, threshold); });
case PROBCUT:
return select<Best>([&](){ return pos.see_ge(move, threshold); });
/* fallthrough */
case QCHECK:
/* fallthrough */
case QCHECK:
- return select<Next>(Any);
+ return select<Next>([](){ return true; });