From: Joel Rosdahl Date: Mon, 21 Oct 2024 18:34:54 +0000 (+0200) Subject: refactor: Avoid const data members X-Git-Tag: v4.11~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=050f5fa9575117cbc8ed3f99f574dc237b4f37ab;p=thirdparty%2Fccache.git refactor: Avoid const data members C++ Core Guidelines C.12 --- diff --git a/src/ccache/core/statistics.cpp b/src/ccache/core/statistics.cpp index 61951d13..2eb786dc 100644 --- a/src/ccache/core/statistics.cpp +++ b/src/ccache/core/statistics.cpp @@ -52,10 +52,10 @@ struct StatisticsField { } - const Statistic statistic; - const char* const id; // for --print-stats - const char* const description; // for --show-stats --verbose - const unsigned flags; // bitmask of FLAG_* values + Statistic statistic; + const char* id; // for --print-stats + const char* description; // for --show-stats --verbose + unsigned flags; // bitmask of FLAG_* values }; } // namespace diff --git a/src/ccache/storage/remote/httpstorage.cpp b/src/ccache/storage/remote/httpstorage.cpp index d51e9404..605fef15 100644 --- a/src/ccache/storage/remote/httpstorage.cpp +++ b/src/ccache/storage/remote/httpstorage.cpp @@ -56,7 +56,7 @@ public: private: enum class Layout { bazel, flat, subdirs }; - const std::string m_url_path; + std::string m_url_path; httplib::Client m_http_client; Layout m_layout = Layout::subdirs; diff --git a/src/ccache/storage/remote/redisstorage.cpp b/src/ccache/storage/remote/redisstorage.cpp index a199a26b..f7be7e24 100644 --- a/src/ccache/storage/remote/redisstorage.cpp +++ b/src/ccache/storage/remote/redisstorage.cpp @@ -78,7 +78,7 @@ public: tl::expected remove(const Hash::Digest& key) override; private: - const std::string m_prefix; + std::string m_prefix; RedisContext m_context; void