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."
This commit is contained in:
Lenny Maiorani 2022-02-26 10:32:57 -07:00 committed by Brian Gianforcaro
parent d5d795b55e
commit 983716cbeb
Notes: sideshowbarker 2024-07-17 17:33:45 +09:00
2 changed files with 2 additions and 5 deletions

View File

@ -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())

View File

@ -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(); }