Refactor: Change the AK::binary_search signature to use AK::Span.

This commit is contained in:
asynts 2020-07-26 11:22:05 +02:00 committed by Andreas Kling
commit 707d92db61
Notes: sideshowbarker 2024-07-19 04:36:28 +09:00
5 changed files with 20 additions and 19 deletions

View file

@ -187,7 +187,7 @@ size_t XtermSuggestionDisplay::fit_to_page_boundary(size_t selection_index)
int index = 0;
auto* match = binary_search(
m_pages.data(), m_pages.size(), { selection_index, selection_index }, [](auto& a, auto& b) -> int {
m_pages.span(), { selection_index, selection_index }, [](auto& a, auto& b) -> int {
if (a.start >= b.start && a.start < b.end)
return 0;
return a.start - b.start;