mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:27:35 +00:00
Demos: Use default constructors/destructors
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
ab14abc40f
commit
0ec688f86e
11 changed files with 23 additions and 48 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2021, the SerenityOS developers.
|
||||
* Copyright (c) 2021-2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -17,7 +17,7 @@
|
|||
class MouseCursorModel final : public GUI::Model {
|
||||
public:
|
||||
static NonnullRefPtr<MouseCursorModel> create() { return adopt_ref(*new MouseCursorModel); }
|
||||
virtual ~MouseCursorModel() override { }
|
||||
virtual ~MouseCursorModel() override = default;
|
||||
|
||||
enum Column {
|
||||
Bitmap,
|
||||
|
@ -86,7 +86,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
MouseCursorModel() { }
|
||||
MouseCursorModel() = default;
|
||||
|
||||
struct Cursor {
|
||||
RefPtr<Gfx::Bitmap> bitmap;
|
||||
|
@ -101,7 +101,7 @@ private:
|
|||
class FileIconsModel final : public GUI::Model {
|
||||
public:
|
||||
static NonnullRefPtr<FileIconsModel> create() { return adopt_ref(*new FileIconsModel); }
|
||||
virtual ~FileIconsModel() override { }
|
||||
virtual ~FileIconsModel() override = default;
|
||||
|
||||
enum Column {
|
||||
BigIcon,
|
||||
|
@ -189,7 +189,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
FileIconsModel() { }
|
||||
FileIconsModel() = default;
|
||||
|
||||
struct IconSet {
|
||||
RefPtr<Gfx::Bitmap> big_icon;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue