| 466 | |
| 467 | template <typename CType> |
| 468 | Comparator<CType>* GetComparator(CompareOperator op) { |
| 469 | static Comparator<CType>* cmp[] = { |
| 470 | // EQUAL |
| 471 | [](CType l, CType r) { return l == r; }, |
| 472 | // NOT_EQUAL |
| 473 | [](CType l, CType r) { return l != r; }, |
| 474 | // GREATER |
| 475 | [](CType l, CType r) { return l > r; }, |
| 476 | // GREATER_EQUAL |
| 477 | [](CType l, CType r) { return l >= r; }, |
| 478 | // LESS |
| 479 | [](CType l, CType r) { return l < r; }, |
| 480 | // LESS_EQUAL |
| 481 | [](CType l, CType r) { return l <= r; }, |
| 482 | }; |
| 483 | return cmp[op]; |
| 484 | } |
| 485 | |
| 486 | template <typename T, typename Fn, typename CType = typename TypeTraits<T>::CType> |
| 487 | std::shared_ptr<Array> CompareAndFilter(const CType* data, int64_t length, Fn&& fn) { |
nothing calls this directly
no outgoing calls
no test coverage detected