From 936fb83eec4038a48e6e42f9f5d93677dc216ab4 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 9 Dec 2024 21:51:13 +0100 Subject: More clang-tidy fixes --- src/bootstrap.cc | 4 ++-- src/build.cc | 2 +- src/configure.cc | 4 ++-- src/configure.h | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/bootstrap.cc b/src/bootstrap.cc index 45ecad4..57db670 100644 --- a/src/bootstrap.cc +++ b/src/bootstrap.cc @@ -19,8 +19,8 @@ #include "build.cc" #include "tools.cc" -std::filesystem::path configurationFile("configuration.cc"); -std::filesystem::path configHeaderFile("config.h"); +const std::filesystem::path configurationFile("configuration.cc"); +const std::filesystem::path configHeaderFile("config.h"); const ctor::configuration& ctor::get_configuration() { diff --git a/src/build.cc b/src/build.cc index ca02514..3e64cca 100644 --- a/src/build.cc +++ b/src/build.cc @@ -38,7 +38,7 @@ int build(const ctor::settings& settings, // Dry-run returns number of dirty tasks but otherwise does nothing. if(dryrun) { - return dirtyTasks.size(); + return static_cast(dirtyTasks.size()); } if(dirtyTasks.empty()) diff --git a/src/configure.cc b/src/configure.cc index a0e107a..26d3575 100644 --- a/src/configure.cc +++ b/src/configure.cc @@ -18,8 +18,8 @@ #include "tools.h" #include "util.h" -std::filesystem::path configurationFile("configuration.cc"); -std::filesystem::path configHeaderFile("config.h"); +const std::filesystem::path configurationFile("configuration.cc"); +const std::filesystem::path configHeaderFile("config.h"); std::map external_includedir; std::map external_libdir; diff --git a/src/configure.h b/src/configure.h index ac8d721..5344646 100644 --- a/src/configure.h +++ b/src/configure.h @@ -12,8 +12,8 @@ namespace ctor { struct settings; } // namespace ctor:: -extern std::filesystem::path configurationFile;; -extern std::filesystem::path configHeaderFile; +extern const std::filesystem::path configurationFile; +extern const std::filesystem::path configHeaderFile; int configure(const ctor::settings& settings, int argc, char* argv[]); int reconfigure(const ctor::settings& settings, int argc, char* argv[]); -- cgit v1.2.3