From ce23db59c6399199fa55b4b7dc8880522e2f1bca Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Mon, 30 Sep 2024 12:16:43 +0200 Subject: Enable readability-redundant-member-init check. --- src/other_tools/ops_maps/content_cas_map.hpp | 22 +++++++++++----------- src/other_tools/ops_maps/critical_git_op_map.hpp | 2 +- src/other_tools/ops_maps/git_tree_fetch_map.hpp | 10 +++++----- src/other_tools/ops_maps/git_update_map.hpp | 6 +++--- src/other_tools/ops_maps/import_to_git_map.hpp | 6 +++--- 5 files changed, 23 insertions(+), 23 deletions(-) (limited to 'src/other_tools/ops_maps') diff --git a/src/other_tools/ops_maps/content_cas_map.hpp b/src/other_tools/ops_maps/content_cas_map.hpp index 69f10dbc..ff5bf22c 100644 --- a/src/other_tools/ops_maps/content_cas_map.hpp +++ b/src/other_tools/ops_maps/content_cas_map.hpp @@ -35,14 +35,14 @@ #include "src/utils/cpp/hash_combine.hpp" struct ArchiveContent { - HashInfo content_hash{}; /* key */ + HashInfo content_hash; /* key */ std::optional distfile{std::nullopt}; - std::string fetch_url{}; - std::vector mirrors{}; + std::string fetch_url; + std::vector mirrors; std::optional sha256{std::nullopt}; std::optional sha512{std::nullopt}; // name of repository for which work is done; used in progress reporting - std::string origin{}; + std::string origin; [[nodiscard]] auto operator==(const ArchiveContent& other) const -> bool { return content_hash.Hash() == other.content_hash.Hash(); @@ -51,9 +51,9 @@ struct ArchiveContent { // Used in callers of ContentCASMap which need extra fields struct ArchiveRepoInfo { - ArchiveContent archive{}; /* key */ - std::string repo_type{}; /* key */ - std::string subdir{}; /* key */ + ArchiveContent archive; /* key */ + std::string repo_type; /* key */ + std::string subdir; /* key */ // create root based on "special" pragma value std::optional pragma_special{std::nullopt}; /* key */ // create an absent root @@ -68,10 +68,10 @@ struct ArchiveRepoInfo { }; struct ForeignFileInfo { - ArchiveContent archive{}; /* key */ - std::string name{}; /* key */ - bool executable{}; /* key */ - bool absent{}; /* key */ + ArchiveContent archive; /* key */ + std::string name; /* key */ + bool executable{}; /* key */ + bool absent{}; /* key */ [[nodiscard]] auto operator==(const ForeignFileInfo& other) const -> bool { return archive == other.archive and name == other.name and diff --git a/src/other_tools/ops_maps/critical_git_op_map.hpp b/src/other_tools/ops_maps/critical_git_op_map.hpp index 8c75874c..73ee6a70 100644 --- a/src/other_tools/ops_maps/critical_git_op_map.hpp +++ b/src/other_tools/ops_maps/critical_git_op_map.hpp @@ -84,7 +84,7 @@ class CriticalGitOpGuard { } private: - std::unordered_map curr_critical_key_{}; + std::unordered_map curr_critical_key_; std::mutex critical_key_mutex_; }; diff --git a/src/other_tools/ops_maps/git_tree_fetch_map.hpp b/src/other_tools/ops_maps/git_tree_fetch_map.hpp index 04d28ea2..e5949099 100644 --- a/src/other_tools/ops_maps/git_tree_fetch_map.hpp +++ b/src/other_tools/ops_maps/git_tree_fetch_map.hpp @@ -33,12 +33,12 @@ // Stores all the information needed to make a Git tree available struct GitTreeInfo { - HashInfo tree_hash{}; /* key */ - std::map env_vars{}; - std::vector inherit_env{}; - std::vector command{}; + HashInfo tree_hash; /* key */ + std::map env_vars; + std::vector inherit_env; + std::vector command; // name of repository for which work is done; used in progress reporting - std::string origin{}; + std::string origin; [[nodiscard]] auto operator==(const GitTreeInfo& other) const -> bool { return tree_hash.Hash() == other.tree_hash.Hash(); diff --git a/src/other_tools/ops_maps/git_update_map.hpp b/src/other_tools/ops_maps/git_update_map.hpp index d30ebe07..3c36a4b4 100644 --- a/src/other_tools/ops_maps/git_update_map.hpp +++ b/src/other_tools/ops_maps/git_update_map.hpp @@ -30,9 +30,9 @@ #include "src/utils/cpp/hash_combine.hpp" struct RepoDescriptionForUpdating { - std::string repo{}; - std::string branch{}; - std::vector inherit_env{}; /*non-key!*/ + std::string repo; + std::string branch; + std::vector inherit_env; /*non-key!*/ [[nodiscard]] auto operator==(const RepoDescriptionForUpdating& other) const -> bool { diff --git a/src/other_tools/ops_maps/import_to_git_map.hpp b/src/other_tools/ops_maps/import_to_git_map.hpp index cd6fdbef..d0a59f3c 100644 --- a/src/other_tools/ops_maps/import_to_git_map.hpp +++ b/src/other_tools/ops_maps/import_to_git_map.hpp @@ -28,9 +28,9 @@ #include "src/utils/cpp/path_hash.hpp" struct CommitInfo { - std::filesystem::path target_path{}; /*key*/ - std::string repo_type{}; - std::string content{}; // hash or path + std::filesystem::path target_path; /*key*/ + std::string repo_type; + std::string content; // hash or path CommitInfo(std::filesystem::path const& target_path_, std::string repo_type_, -- cgit v1.2.3