diff options
author | Lenny Maiorani <lenny@serenityos.org> | 2022-03-04 13:26:44 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-13 22:34:38 +0100 |
commit | a53c00f1df5e6e8eafd9ea32d51f5a7fa0aa3f1c (patch) | |
tree | 3fc6b0f31b6ff993dce008b054fca755f96e1578 /Userland/Libraries | |
parent | 7cc6ba16bee02c9984604b9c8c878af11561cfd6 (diff) | |
download | serenity-a53c00f1df5e6e8eafd9ea32d51f5a7fa0aa3f1c.zip |
Libraries: Use default constructors/destructors in LibThreading
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules
"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibThreading/BackgroundAction.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Userland/Libraries/LibThreading/BackgroundAction.h b/Userland/Libraries/LibThreading/BackgroundAction.h index ee2b95dd80..a567851176 100644 --- a/Userland/Libraries/LibThreading/BackgroundAction.h +++ b/Userland/Libraries/LibThreading/BackgroundAction.h @@ -1,6 +1,7 @@ /* * Copyright (c) 2019-2020, Sergey Bugaev <bugaevc@serenityos.org> * Copyright (c) 2021, Andreas Kling <kling@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -26,7 +27,7 @@ class BackgroundActionBase { friend class BackgroundAction; private: - BackgroundActionBase() { } + BackgroundActionBase() = default; static void enqueue_work(Function<void()>); static Thread& background_thread(); @@ -48,7 +49,7 @@ public: return m_cancelled; } - virtual ~BackgroundAction() { } + virtual ~BackgroundAction() = default; private: BackgroundAction(Function<Result(BackgroundAction&)> action, Function<void(Result)> on_complete) |