From 8f20c3334b0fb36d099f2d7c60190e55956ace47 Mon Sep 17 00:00:00 2001 From: Lenny Maiorani Date: Sat, 26 Feb 2022 10:33:23 -0700 Subject: [PATCH] Libraries: Use default constructors/destructors in LibDl 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/LibDl/dlfcn_integration.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibDl/dlfcn_integration.h b/Userland/Libraries/LibDl/dlfcn_integration.h index 19a8251ae2..aa4642d4f3 100644 --- a/Userland/Libraries/LibDl/dlfcn_integration.h +++ b/Userland/Libraries/LibDl/dlfcn_integration.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2021, Gunnar Beutner + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -18,7 +19,7 @@ struct DlErrorMessage { // The virtual destructor is required because we're passing this // struct to the dynamic loader - whose operator delete differs // from the one in libc.so - virtual ~DlErrorMessage() { } + virtual ~DlErrorMessage() = default; String text; };