]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
chore: Make some constructors explicit
authorJoel Rosdahl <joel@rosdahl.net>
Fri, 30 Jun 2023 20:00:13 +0000 (22:00 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 2 Jul 2023 08:35:08 +0000 (10:35 +0200)
src/File.hpp
src/core/Statistics.hpp
src/core/StatsLog.hpp

index 5ace57041273bebb9c6b10f4407887c7d1edf791..ad0332c5110b0e83cd4f549c80a3fd484c24edc4 100644 (file)
@@ -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();
index f74d81e522741c9f0b0f22eebd9b05cb910e58aa..fcf27afcf6c2bb531afd76972fbded9f7ea0e01e 100644 (file)
@@ -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<std::string> get_statistics_ids() const;
index 19284de293fcd78980ee5a614c3da73994a6387d..a8ed9b1c69c22e0657b55ec3e09aa91b68ed1310 100644 (file)
@@ -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,