Skip to content

Commit 7c4b841

Browse files
committed
[resources] add: absl hasher for Resref
1 parent de12d4a commit 7c4b841

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/nw/resources/Resref.hpp

+6
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ void from_json(const nlohmann::json& j, Resref& r);
9696
/// nlohmann::json specialization
9797
void to_json(nlohmann::json& j, const Resref& r);
9898

99+
template <typename H>
100+
H AbslHashValue(H h, const Resref& res)
101+
{
102+
return H::combine(std::move(h), res.view());
103+
}
104+
99105
} // namespace nw
100106

101107
template <>

0 commit comments

Comments
 (0)