mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
Kernel: Add a Process::FileDescriptions::get_if_valid(index) API
Note that this is not the same as ::at(index), which has a different precondition ("allocated" vs "valid").
This commit is contained in:
parent
c1ffc17134
commit
e9feced041
Notes:
sideshowbarker
2024-07-18 05:38:05 +09:00
Author: https://github.com/alimpfard
Commit: e9feced041
Pull-request: https://github.com/SerenityOS/serenity/pull/9444
2 changed files with 26 additions and 0 deletions
|
@ -643,6 +643,9 @@ public:
|
|||
const FileDescriptionAndFlags& at(size_t i) const;
|
||||
FileDescriptionAndFlags& at(size_t i);
|
||||
|
||||
FileDescriptionAndFlags const* get_if_valid(size_t i) const;
|
||||
FileDescriptionAndFlags* get_if_valid(size_t i);
|
||||
|
||||
void enumerate(Function<void(const FileDescriptionAndFlags&)>) const;
|
||||
void change_each(Function<void(FileDescriptionAndFlags&)>);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue