Skip to content

Commit

Permalink
fix(EdgeVertex): missing hashing support (#857)
Browse files Browse the repository at this point in the history
* fix(EdgeVertex): missing hashing support

* Apply prepare changes

---------

Co-authored-by: BotellaA <BotellaA@users.noreply.github.com>
  • Loading branch information
BotellaA and BotellaA authored Oct 16, 2023
1 parent 05d57b9 commit 8aaec61
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions include/geode/mesh/core/graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,17 @@ namespace geode
IMPLEMENTATION_MEMBER( impl_ );
};
} // namespace geode

namespace std
{
template <>
struct hash< geode::EdgeVertex >
{
public:
size_t operator()( const geode::EdgeVertex& edge_vertex ) const
{
return absl::Hash< geode::index_t >()( edge_vertex.edge_id )
^ absl::Hash< geode::index_t >()( edge_vertex.vertex_id );
}
};
} // namespace std

0 comments on commit 8aaec61

Please sign in to comment.