mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-28 23:39:02 +00:00
Kernel: Annotate more AsyncDeviceRequest API's with [[nodiscard]]
This commit is contained in:
parent
033b287635
commit
ce5a308f24
Notes:
sideshowbarker
2024-07-18 19:17:44 +09:00
Author: https://github.com/bgianfo
Commit: ce5a308f24
Pull-request: https://github.com/SerenityOS/serenity/pull/6509
Reviewed-by: https://github.com/alimpfard
1 changed files with 3 additions and 3 deletions
|
@ -45,7 +45,7 @@ class AsyncDeviceRequest : public RefCounted<AsyncDeviceRequest> {
|
||||||
AK_MAKE_NONMOVABLE(AsyncDeviceRequest);
|
AK_MAKE_NONMOVABLE(AsyncDeviceRequest);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum RequestResult {
|
enum [[nodiscard]] RequestResult {
|
||||||
Pending = 0,
|
Pending = 0,
|
||||||
Started,
|
Started,
|
||||||
Success,
|
Success,
|
||||||
|
@ -145,14 +145,14 @@ private:
|
||||||
void sub_request_finished(AsyncDeviceRequest&);
|
void sub_request_finished(AsyncDeviceRequest&);
|
||||||
void request_finished();
|
void request_finished();
|
||||||
|
|
||||||
bool in_target_context(const UserOrKernelBuffer& buffer) const
|
[[nodiscard]] bool in_target_context(const UserOrKernelBuffer& buffer) const
|
||||||
{
|
{
|
||||||
if (buffer.is_kernel_buffer())
|
if (buffer.is_kernel_buffer())
|
||||||
return true;
|
return true;
|
||||||
return m_process == Process::current();
|
return m_process == Process::current();
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool is_completed_result(RequestResult result)
|
[[nodiscard]] static bool is_completed_result(RequestResult result)
|
||||||
{
|
{
|
||||||
return result > Started;
|
return result > Started;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue