diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-09-30 12:16:43 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-10-07 13:37:39 +0200 |
commit | ce23db59c6399199fa55b4b7dc8880522e2f1bca (patch) | |
tree | 5b77d3c84289f023cbe6f4a81cf391a0087fe660 /src/other_tools/ops_maps | |
parent | e5d7cb5ce5b9cc40b0c56b18980a4234118c1739 (diff) | |
download | justbuild-ce23db59c6399199fa55b4b7dc8880522e2f1bca.tar.gz |
Enable readability-redundant-member-init check.
Diffstat (limited to 'src/other_tools/ops_maps')
-rw-r--r-- | src/other_tools/ops_maps/content_cas_map.hpp | 22 | ||||
-rw-r--r-- | src/other_tools/ops_maps/critical_git_op_map.hpp | 2 | ||||
-rw-r--r-- | src/other_tools/ops_maps/git_tree_fetch_map.hpp | 10 | ||||
-rw-r--r-- | src/other_tools/ops_maps/git_update_map.hpp | 6 | ||||
-rw-r--r-- | src/other_tools/ops_maps/import_to_git_map.hpp | 6 |
5 files changed, 23 insertions, 23 deletions
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<std::string> distfile{std::nullopt}; - std::string fetch_url{}; - std::vector<std::string> mirrors{}; + std::string fetch_url; + std::vector<std::string> mirrors; std::optional<std::string> sha256{std::nullopt}; std::optional<std::string> 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<PragmaSpecial> 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<size_t, GitOpKey> curr_critical_key_{}; + std::unordered_map<size_t, GitOpKey> 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<std::string, std::string> env_vars{}; - std::vector<std::string> inherit_env{}; - std::vector<std::string> command{}; + HashInfo tree_hash; /* key */ + std::map<std::string, std::string> env_vars; + std::vector<std::string> inherit_env; + std::vector<std::string> 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<std::string> inherit_env{}; /*non-key!*/ + std::string repo; + std::string branch; + std::vector<std::string> 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_, |