mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
Kernel: Convert Inode event APIs to use StringViews instead of Strings
These APIs allocate a copy internally anyways, so there's no point to making another one for them.
This commit is contained in:
parent
d1d24eaef4
commit
e236f9d85a
Notes:
sideshowbarker
2024-07-17 21:03:24 +09:00
Author: https://github.com/IdanHo
Commit: e236f9d85a
Pull-request: https://github.com/SerenityOS/serenity/pull/11817
Reviewed-by: https://github.com/bgianfo ✅
4 changed files with 7 additions and 6 deletions
|
@ -12,6 +12,7 @@
|
|||
#include <AK/CircularQueue.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/NonnullOwnPtr.h>
|
||||
#include <AK/String.h>
|
||||
#include <Kernel/API/InodeWatcherEvent.h>
|
||||
#include <Kernel/FileSystem/File.h>
|
||||
#include <Kernel/Forward.h>
|
||||
|
@ -54,7 +55,7 @@ public:
|
|||
virtual StringView class_name() const override { return "InodeWatcher"sv; };
|
||||
virtual bool is_inode_watcher() const override { return true; }
|
||||
|
||||
void notify_inode_event(Badge<Inode>, InodeIdentifier, InodeWatcherEvent::Type, String const& name = {});
|
||||
void notify_inode_event(Badge<Inode>, InodeIdentifier, InodeWatcherEvent::Type, StringView name = {});
|
||||
|
||||
ErrorOr<int> register_inode(Inode&, unsigned event_mask);
|
||||
ErrorOr<void> unregister_by_wd(int);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue