mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 09:17:35 +00:00
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:
parent
d5d795b55e
commit
983716cbeb
2 changed files with 2 additions and 5 deletions
|
@ -1,6 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2020, Linus Groh <linusg@serenityos.org>
|
* Copyright (c) 2020, Linus Groh <linusg@serenityos.org>
|
||||||
* Copyright (c) 2021, Spencer Dixon <spencercdixon@gmail.com>
|
* Copyright (c) 2021, Spencer Dixon <spencercdixon@gmail.com>
|
||||||
|
* Copyright (c) 2022, the SerenityOS developers.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -48,10 +49,6 @@ AppFile::AppFile(StringView path)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
AppFile::~AppFile()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool AppFile::validate() const
|
bool AppFile::validate() const
|
||||||
{
|
{
|
||||||
if (m_config->read_entry("App", "Name").trim_whitespace().is_empty())
|
if (m_config->read_entry("App", "Name").trim_whitespace().is_empty())
|
||||||
|
|
|
@ -19,7 +19,7 @@ public:
|
||||||
static NonnullRefPtr<AppFile> get_for_app(StringView app_name);
|
static NonnullRefPtr<AppFile> get_for_app(StringView app_name);
|
||||||
static NonnullRefPtr<AppFile> open(StringView path);
|
static NonnullRefPtr<AppFile> open(StringView path);
|
||||||
static void for_each(Function<void(NonnullRefPtr<AppFile>)>, StringView directory = APP_FILES_DIRECTORY);
|
static void for_each(Function<void(NonnullRefPtr<AppFile>)>, StringView directory = APP_FILES_DIRECTORY);
|
||||||
~AppFile();
|
~AppFile() = default;
|
||||||
|
|
||||||
bool is_valid() const { return m_valid; }
|
bool is_valid() const { return m_valid; }
|
||||||
String filename() const { return m_config->filename(); }
|
String filename() const { return m_config->filename(); }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue