From 11b28c88fc9cf7a05c2ec27ba39f3dbfad76b492 Mon Sep 17 00:00:00 2001 From: Lenny Maiorani Date: Sat, 26 Feb 2022 09:05:16 -0700 Subject: [PATCH] Libraries: Use default constructors/destructors in LibCards 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." --- Userland/Libraries/LibCards/Card.cpp | 4 ---- Userland/Libraries/LibCards/Card.h | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Userland/Libraries/LibCards/Card.cpp b/Userland/Libraries/LibCards/Card.cpp index 497e64ade7..b42116fa80 100644 --- a/Userland/Libraries/LibCards/Card.cpp +++ b/Userland/Libraries/LibCards/Card.cpp @@ -139,10 +139,6 @@ Card::Card(Type type, uint8_t value) m_front_inverted = invert_bitmap(*m_front); } -Card::~Card() -{ -} - void Card::draw(GUI::Painter& painter) const { VERIFY(!s_background.is_null()); diff --git a/Userland/Libraries/LibCards/Card.h b/Userland/Libraries/LibCards/Card.h index d56b5c71ba..78e7c5fc03 100644 --- a/Userland/Libraries/LibCards/Card.h +++ b/Userland/Libraries/LibCards/Card.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2020, Till Mayer + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -36,7 +37,7 @@ public: __Count }; - virtual ~Card() override; + virtual ~Card() override = default; Gfx::IntRect& rect() { return m_rect; } Gfx::IntPoint position() const { return m_rect.location(); }