mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-11 09:27:00 +02:00
Refactor: Change the AK::binary_search signature to use AK::Span.
This commit is contained in:
Notes:
sideshowbarker
2024-07-19 04:36:28 +09:00
Author: https://github.com/asynts Commit: https://github.com/SerenityOS/serenity/commit/707d92db612 Pull-request: https://github.com/SerenityOS/serenity/pull/2884 Reviewed-by: https://github.com/awesomekling
@@ -878,7 +878,7 @@ Vector<Line::CompletionSuggestion> Shell::complete_path(const String& base, cons
|
||||
|
||||
Vector<Line::CompletionSuggestion> Shell::complete_program_name(const String& name, size_t offset)
|
||||
{
|
||||
auto match = binary_search(cached_path.data(), cached_path.size(), name, [](const String& name, const String& program) -> int {
|
||||
auto match = binary_search(cached_path.span(), name, [](const String& name, const String& program) -> int {
|
||||
return strncmp(name.characters(), program.characters(), name.length());
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user