mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Remove "Any" predicate filter (#1914)
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.
This commit is contained in:
parent
e2d3c163cb
commit
7accf07c0b
1 changed files with 3 additions and 6 deletions
|
@ -31,9 +31,6 @@ namespace {
|
|||
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) {
|
||||
|
@ -225,7 +222,7 @@ top:
|
|||
/* fallthrough */
|
||||
|
||||
case BAD_CAPTURE:
|
||||
return select<Next>(Any);
|
||||
return select<Next>([](){ return true; });
|
||||
|
||||
case EVASION_INIT:
|
||||
cur = moves;
|
||||
|
@ -236,7 +233,7 @@ top:
|
|||
/* fallthrough */
|
||||
|
||||
case EVASION:
|
||||
return select<Best>(Any);
|
||||
return select<Best>([](){ return true; });
|
||||
|
||||
case PROBCUT:
|
||||
return select<Best>([&](){ return pos.see_ge(move, threshold); });
|
||||
|
@ -261,7 +258,7 @@ top:
|
|||
/* fallthrough */
|
||||
|
||||
case QCHECK:
|
||||
return select<Next>(Any);
|
||||
return select<Next>([](){ return true; });
|
||||
}
|
||||
|
||||
assert(false);
|
||||
|
|
Loading…
Add table
Reference in a new issue