From 6d7d062acb56a349a5c3a9523e581f78dfd2da99 Mon Sep 17 00:00:00 2001 From: Derek Bruening Date: Tue, 6 Sep 2022 18:31:41 -0400 Subject: [PATCH] i#5538 memtrace seek, part 2: Remove redundant "virtual" keywords (#5639) Cleans up the drmemtrace i/o classes by removing redundant "virtual" keywords and adding missing "explicit" constructor qualifiers. Issue: #5538 --- clients/drcachesim/common/archive_ostream.h | 2 +- clients/drcachesim/common/gzip_ostream.h | 12 ++++++------ clients/drcachesim/common/zipfile_ostream.h | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/clients/drcachesim/common/archive_ostream.h b/clients/drcachesim/common/archive_ostream.h index 73d7992899c..cd405564e83 100644 --- a/clients/drcachesim/common/archive_ostream.h +++ b/clients/drcachesim/common/archive_ostream.h @@ -42,7 +42,7 @@ class archive_ostream_t : public std::ostream { public: - archive_ostream_t(std::basic_streambuf> *buf) + explicit archive_ostream_t(std::basic_streambuf> *buf) : std::ostream(buf) { } diff --git a/clients/drcachesim/common/gzip_ostream.h b/clients/drcachesim/common/gzip_ostream.h index f6336b53ec0..da12795ead8 100644 --- a/clients/drcachesim/common/gzip_ostream.h +++ b/clients/drcachesim/common/gzip_ostream.h @@ -1,5 +1,5 @@ /* ********************************************************** - * Copyright (c) 2018-2020 Google, Inc. All rights reserved. + * Copyright (c) 2018-2022 Google, Inc. All rights reserved. * **********************************************************/ /* @@ -51,7 +51,7 @@ */ class gzip_streambuf_t : public std::basic_streambuf> { public: - gzip_streambuf_t(const std::string &path) + explicit gzip_streambuf_t(const std::string &path) { file_ = gzopen(path.c_str(), "wb"); if (file_ != nullptr) { @@ -60,14 +60,14 @@ class gzip_streambuf_t : public std::basic_streambuf> { public: - zipfile_streambuf_t(const std::string &path) + explicit zipfile_streambuf_t(const std::string &path) { zip_ = zipOpen2_64(path.c_str(), APPEND_STATUS_CREATE, nullptr, nullptr); if (zip_ == nullptr) @@ -60,7 +60,7 @@ class zipfile_streambuf_t : public std::basic_streambuf