1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:17:35 +00:00

LibCore: Simplify Core::Notifier by only allowing one event type

Not a single client of this API actually used the event mask feature to
listen for readability AND writability.

Let's simplify the API and have only one hook: on_activation.
This commit is contained in:
Andreas Kling 2023-04-23 20:59:32 +02:00
parent 1587caef84
commit 411d36719e
24 changed files with 80 additions and 99 deletions

View file

@ -59,7 +59,7 @@ public:
// NOTE: This isn't actually used on macOS, but is needed for FileWatcherBase.
// Creating it with an FD of -1 will effectively disable the notifier.
auto notifier = TRY(Notifier::try_create(-1, Notifier::Event::None));
auto notifier = TRY(Notifier::try_create(-1, Notifier::Type::None));
return adopt_nonnull_ref_or_enomem(new (nothrow) FileWatcherMacOS(move(context), dispatch_queue, move(notifier)));
}