summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/other_tools/ops_maps/content_cas_map.hpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/other_tools/ops_maps/content_cas_map.hpp b/src/other_tools/ops_maps/content_cas_map.hpp
index a490b34a..b2f0fb58 100644
--- a/src/other_tools/ops_maps/content_cas_map.hpp
+++ b/src/other_tools/ops_maps/content_cas_map.hpp
@@ -40,12 +40,13 @@ struct ArchiveContent {
// Used in callers of ContentCASMap which need extra fields
struct ArchiveRepoInfo {
- ArchiveContent archive; /* key (see ArchiveContent) */
+ ArchiveContent archive;
std::string repo_type;
std::string subdir;
[[nodiscard]] auto operator==(const ArchiveRepoInfo& other) const -> bool {
- return archive.content == other.archive.content;
+ return archive == other.archive && subdir == other.subdir &&
+ repo_type == other.repo_type;
}
};
@@ -70,9 +71,13 @@ template <>
struct hash<ArchiveRepoInfo> {
[[nodiscard]] auto operator()(const ArchiveRepoInfo& ct) const noexcept
-> std::size_t {
- return std::hash<ArchiveContent>{}(ct.archive);
+ size_t seed{};
+ hash_combine<ArchiveContent>(&seed, ct.archive);
+ hash_combine<std::string>(&seed, ct.subdir);
+ hash_combine<std::string>(&seed, ct.repo_type);
+ return seed;
}
};
} // namespace std
-#endif // INCLUDED_SRC_OTHER_TOOLS_OPS_MAPS_CONTENT_CAS_MAP_HPP \ No newline at end of file
+#endif // INCLUDED_SRC_OTHER_TOOLS_OPS_MAPS_CONTENT_CAS_MAP_HPP