1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 20:28:11 +00:00

Userland: Compare event MIME type list with a StringView

The following commit will port MIME types to String. Traits<String>
- used in Vector::contains_slow - can't compare String type with char*,
so we need to use StringView instead.
This commit is contained in:
Karol Kosek 2023-09-21 19:02:52 +02:00 committed by Sam Atkins
parent 2f35348104
commit e75d694974
16 changed files with 16 additions and 16 deletions

View file

@ -678,7 +678,7 @@ ErrorOr<void> MainWidget::load_from_file(String const& filename, NonnullOwnPtr<C
void MainWidget::drag_enter_event(GUI::DragEvent& event)
{
auto const& mime_types = event.mime_types();
if (mime_types.contains_slow("text/uri-list"))
if (mime_types.contains_slow("text/uri-list"sv))
event.accept();
}