From c6dcb12b000a04a6e2cf840b71fc051078c96256 Mon Sep 17 00:00:00 2001 From: Lenny Maiorani Date: Sat, 26 Feb 2022 09:06:40 -0700 Subject: [PATCH] Libraries: Use default constructors/destructors in LibCompress 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/LibCompress/Gzip.cpp | 6 +----- Userland/Libraries/LibCompress/Gzip.h | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Userland/Libraries/LibCompress/Gzip.cpp b/Userland/Libraries/LibCompress/Gzip.cpp index d5c899426b..f93554d272 100644 --- a/Userland/Libraries/LibCompress/Gzip.cpp +++ b/Userland/Libraries/LibCompress/Gzip.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, the SerenityOS developers. + * Copyright (c) 2020-2022, the SerenityOS developers. * Copyright (c) 2021, Idan Horowitz * * SPDX-License-Identifier: BSD-2-Clause @@ -225,10 +225,6 @@ GzipCompressor::GzipCompressor(OutputStream& stream) { } -GzipCompressor::~GzipCompressor() -{ -} - size_t GzipCompressor::write(ReadonlyBytes bytes) { BlockHeader header; diff --git a/Userland/Libraries/LibCompress/Gzip.h b/Userland/Libraries/LibCompress/Gzip.h index 2a4227b74c..e25b6b0813 100644 --- a/Userland/Libraries/LibCompress/Gzip.h +++ b/Userland/Libraries/LibCompress/Gzip.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, the SerenityOS developers. + * Copyright (c) 2020-2022, the SerenityOS developers. * Copyright (c) 2021, Idan Horowitz * * SPDX-License-Identifier: BSD-2-Clause @@ -82,7 +82,7 @@ private: class GzipCompressor final : public OutputStream { public: GzipCompressor(OutputStream&); - ~GzipCompressor(); + ~GzipCompressor() = default; size_t write(ReadonlyBytes) override; bool write_or_error(ReadonlyBytes) override;