Skip to content

Commit

Permalink
Merge pull request #914 from Geode-solutions/fix/complete-explicit-tests
Browse files Browse the repository at this point in the history
fix(Mesh Mergers): add missing operator== on ElementOrigin structures
  • Loading branch information
panquez committed Apr 11, 2024
2 parents 3704e70 + 55b60f5 commit 3361d99
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/geode/mesh/helpers/detail/curve_merger.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ namespace geode
{
}

bool operator==( const EdgeOrigin& other ) const
{
return curve == other.curve && edge == other.edge;
}

index_t curve;
index_t edge;
};
Expand Down
6 changes: 6 additions & 0 deletions include/geode/mesh/helpers/detail/solid_merger.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ namespace geode
{
}

bool operator==( const PolyhedronOrigin& other ) const
{
return solid == other.solid
&& polyhedron == other.polyhedron;
}

index_t solid;
index_t polyhedron;
};
Expand Down
4 changes: 4 additions & 0 deletions src/geode/mesh/helpers/detail/vertex_merger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ namespace
std::unique_ptr< Mesh > create_mesh(
absl::Span< const std::reference_wrapper< const Mesh > > meshes )
{
if( meshes.empty() )
{
return Mesh::create();
}
const auto type = meshes.front().get().type_name();
for( const auto& mesh : meshes )
{
Expand Down

0 comments on commit 3361d99

Please sign in to comment.