mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 16:24:59 +00:00
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."
This commit is contained in:
parent
7cc6ba16be
commit
a53c00f1df
1 changed files with 3 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2019-2020, Sergey Bugaev <bugaevc@serenityos.org>
|
* Copyright (c) 2019-2020, Sergey Bugaev <bugaevc@serenityos.org>
|
||||||
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
||||||
|
* Copyright (c) 2022, the SerenityOS developers.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -26,7 +27,7 @@ class BackgroundActionBase {
|
||||||
friend class BackgroundAction;
|
friend class BackgroundAction;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BackgroundActionBase() { }
|
BackgroundActionBase() = default;
|
||||||
|
|
||||||
static void enqueue_work(Function<void()>);
|
static void enqueue_work(Function<void()>);
|
||||||
static Thread& background_thread();
|
static Thread& background_thread();
|
||||||
|
@ -48,7 +49,7 @@ public:
|
||||||
return m_cancelled;
|
return m_cancelled;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~BackgroundAction() { }
|
virtual ~BackgroundAction() = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BackgroundAction(Function<Result(BackgroundAction&)> action, Function<void(Result)> on_complete)
|
BackgroundAction(Function<Result(BackgroundAction&)> action, Function<void(Result)> on_complete)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue