summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorLenny Maiorani <lenny@serenityos.org>2022-02-26 10:32:57 -0700
committerBrian Gianforcaro <b.gianfo@gmail.com>2022-03-10 18:04:26 -0800
commit983716cbeb6c7e7b586cb25326fbb878473b5136 (patch)
treef66a0a1787eb25d40342f1a6b40bc4d7b01f49b9 /Userland/Libraries
parentd5d795b55ef0a314c02f2595e7f134945b941dc1 (diff)
downloadserenity-983716cbeb6c7e7b586cb25326fbb878473b5136.zip
Libraries: Use default constructors/destructors in LibDesktop
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/LibDesktop/AppFile.cpp5
-rw-r--r--Userland/Libraries/LibDesktop/AppFile.h2
2 files changed, 2 insertions, 5 deletions
diff --git a/Userland/Libraries/LibDesktop/AppFile.cpp b/Userland/Libraries/LibDesktop/AppFile.cpp
index d73a468ea1..f46d765958 100644
--- a/Userland/Libraries/LibDesktop/AppFile.cpp
+++ b/Userland/Libraries/LibDesktop/AppFile.cpp
@@ -1,6 +1,7 @@
/*
* Copyright (c) 2020, Linus Groh <linusg@serenityos.org>
* Copyright (c) 2021, Spencer Dixon <spencercdixon@gmail.com>
+ * Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -48,10 +49,6 @@ AppFile::AppFile(StringView path)
{
}
-AppFile::~AppFile()
-{
-}
-
bool AppFile::validate() const
{
if (m_config->read_entry("App", "Name").trim_whitespace().is_empty())
diff --git a/Userland/Libraries/LibDesktop/AppFile.h b/Userland/Libraries/LibDesktop/AppFile.h
index a595cc67f0..98f3af6cf0 100644
--- a/Userland/Libraries/LibDesktop/AppFile.h
+++ b/Userland/Libraries/LibDesktop/AppFile.h
@@ -19,7 +19,7 @@ public:
static NonnullRefPtr<AppFile> get_for_app(StringView app_name);
static NonnullRefPtr<AppFile> open(StringView path);
static void for_each(Function<void(NonnullRefPtr<AppFile>)>, StringView directory = APP_FILES_DIRECTORY);
- ~AppFile();
+ ~AppFile() = default;
bool is_valid() const { return m_valid; }
String filename() const { return m_config->filename(); }