summaryrefslogtreecommitdiff
path: root/src/other_tools/root_maps/commit_git_map.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/other_tools/root_maps/commit_git_map.hpp')
-rw-r--r--src/other_tools/root_maps/commit_git_map.hpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/other_tools/root_maps/commit_git_map.hpp b/src/other_tools/root_maps/commit_git_map.hpp
index e032cf65..eb7c26a9 100644
--- a/src/other_tools/root_maps/commit_git_map.hpp
+++ b/src/other_tools/root_maps/commit_git_map.hpp
@@ -27,10 +27,10 @@ struct GitRepoInfo {
std::string hash{}; /* key */
std::string repo_url{};
std::string branch{};
- std::string subdir{};
+ std::string subdir{}; /* key */
[[nodiscard]] auto operator==(const GitRepoInfo& other) const -> bool {
- return hash == other.hash;
+ return hash == other.hash and subdir == other.subdir;
}
};
@@ -39,7 +39,10 @@ template <>
struct hash<GitRepoInfo> {
[[nodiscard]] auto operator()(const GitRepoInfo& ct) const noexcept
-> std::size_t {
- return std::hash<std::string>{}(ct.hash);
+ size_t seed{};
+ hash_combine<std::string>(&seed, ct.hash);
+ hash_combine<std::string>(&seed, ct.subdir);
+ return seed;
}
};
} // namespace std