From: Joel Rosdahl Date: Fri, 30 Jun 2023 20:00:13 +0000 (+0200) Subject: chore: Make some constructors explicit X-Git-Tag: v4.9~159 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d64b1472a24420ceec89a77935f9cbe460443bce;p=thirdparty%2Fccache.git chore: Make some constructors explicit --- diff --git a/src/File.hpp b/src/File.hpp index 5ace57041..ad0332c51 100644 --- a/src/File.hpp +++ b/src/File.hpp @@ -27,7 +27,7 @@ class File : public NonCopyable { public: File() = default; - File(FILE* file); + explicit File(FILE* file); File(const std::string& path, const char* mode); File(File&& other) noexcept; ~File(); diff --git a/src/core/Statistics.hpp b/src/core/Statistics.hpp index f74d81e52..fcf27afcf 100644 --- a/src/core/Statistics.hpp +++ b/src/core/Statistics.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2020-2022 Joel Rosdahl and other contributors +// Copyright (C) 2020-2023 Joel Rosdahl and other contributors // // See doc/AUTHORS.adoc for a complete list of contributors. // @@ -34,7 +34,7 @@ namespace core { class Statistics { public: - Statistics(const StatisticsCounters& counters); + explicit Statistics(const StatisticsCounters& counters); // Return machine-readable strings representing the statistics counters. std::vector get_statistics_ids() const; diff --git a/src/core/StatsLog.hpp b/src/core/StatsLog.hpp index 19284de29..a8ed9b1c6 100644 --- a/src/core/StatsLog.hpp +++ b/src/core/StatsLog.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2021 Joel Rosdahl and other contributors +// Copyright (C) 2021-2023 Joel Rosdahl and other contributors // // See doc/AUTHORS.adoc for a complete list of contributors. // @@ -28,7 +28,7 @@ namespace core { class StatsLog { public: - StatsLog(const std::string& path); + explicit StatsLog(const std::string& path); StatisticsCounters read() const; void log_result(const std::string& input_file,