Skip to content

Commit

Permalink
fix(OpenGeode): update to new warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
BotellaA committed Sep 12, 2024
1 parent 740238c commit 8c80bab
Show file tree
Hide file tree
Showing 53 changed files with 248 additions and 205 deletions.
6 changes: 3 additions & 3 deletions include/geode/inspector/brep_inspector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ namespace geode
BRepMeshesInspectionResult meshes;
BRepTopologyInspectionResult topology;

std::string string() const;
[[nodiscard]] std::string string() const;

std::string inspection_type() const;
[[nodiscard]] std::string inspection_type() const;
};
/*!
* Class for inspecting a BRep model
Expand All @@ -58,6 +58,6 @@ namespace geode
public:
explicit BRepInspector( const BRep& brep );

BRepInspectionResult inspect_brep() const;
[[nodiscard]] BRepInspectionResult inspect_brep() const;
};
} // namespace geode
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ namespace geode
"BRep Block mesh with wrong adjacencies on polyhedron facets"
};

std::string string() const;
[[nodiscard]] std::string string() const;

std::string inspection_type() const;
[[nodiscard]] std::string inspection_type() const;
};

/*!
Expand All @@ -70,7 +70,7 @@ namespace geode

~BRepComponentMeshesAdjacency();

BRepMeshesAdjacencyInspectionResult
[[nodiscard]] BRepMeshesAdjacencyInspectionResult
inspect_brep_meshes_adjacencies() const;

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ namespace geode
"Section Surface mesh with wrong adjacencies on polygon edges"
};

std::string string() const;
[[nodiscard]] std::string string() const;

std::string inspection_type() const;
[[nodiscard]] std::string inspection_type() const;
};
/*!
* Class for inspecting the adjacency of the surface edges in the Component
Expand All @@ -65,7 +65,7 @@ namespace geode

~SectionComponentMeshesAdjacency();

SectionMeshesAdjacencyInspectionResult
[[nodiscard]] SectionMeshesAdjacencyInspectionResult
inspect_section_meshes_adjacencies() const;

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ namespace geode

~SolidMeshAdjacency();

bool mesh_has_wrong_adjacencies() const;
[[nodiscard]] bool mesh_has_wrong_adjacencies() const;

InspectionIssues< PolyhedronFacet >
[[nodiscard]] InspectionIssues< PolyhedronFacet >
polyhedron_facets_with_wrong_adjacency() const;

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ namespace geode

~SurfaceMeshAdjacency();

bool mesh_has_wrong_adjacencies() const;
[[nodiscard]] bool mesh_has_wrong_adjacencies() const;

InspectionIssues< PolygonEdge >
[[nodiscard]] InspectionIssues< PolygonEdge >
polygon_edges_with_wrong_adjacency() const;

private:
Expand Down
6 changes: 3 additions & 3 deletions include/geode/inspector/criterion/brep_meshes_inspector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ namespace geode
BRepMeshesManifoldInspectionResult meshes_non_manifolds;
BRepMeshesNegativeElementsInspectionResult meshes_negative_elements;

std::string string() const;
[[nodiscard]] std::string string() const;

std::string inspection_type() const;
[[nodiscard]] std::string inspection_type() const;
};

/*!
Expand All @@ -67,6 +67,6 @@ namespace geode
public:
explicit BRepMeshesInspector( const BRep& brep );

BRepMeshesInspectionResult inspect_brep_meshes() const;
[[nodiscard]] BRepMeshesInspectionResult inspect_brep_meshes() const;
};
} // namespace geode
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ namespace geode
"Model component meshes with colocated points"
};

std::string string() const;
[[nodiscard]] std::string string() const;

std::string inspection_type() const;
[[nodiscard]] std::string inspection_type() const;
};

/*!
Expand All @@ -63,7 +63,7 @@ namespace geode

~ComponentMeshesColocation();

MeshesColocationInspectionResult
[[nodiscard]] MeshesColocationInspectionResult
inspect_meshes_point_colocations() const;

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ namespace geode

~EdgedCurveColocation();

bool mesh_has_colocated_points() const;
[[nodiscard]] bool mesh_has_colocated_points() const;

InspectionIssues< std::vector< index_t > >
[[nodiscard]] InspectionIssues< std::vector< index_t > >
colocated_points_groups() const;

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ namespace geode

~PointSetColocation();

bool mesh_has_colocated_points() const;
[[nodiscard]] bool mesh_has_colocated_points() const;

InspectionIssues< std::vector< index_t > >
[[nodiscard]] InspectionIssues< std::vector< index_t > >
colocated_points_groups() const;

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ namespace geode

~SolidMeshColocation();

bool mesh_has_colocated_points() const;
[[nodiscard]] bool mesh_has_colocated_points() const;

InspectionIssues< std::vector< index_t > >
[[nodiscard]] InspectionIssues< std::vector< index_t > >
colocated_points_groups() const;

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ namespace geode

~SurfaceMeshColocation();

bool mesh_has_colocated_points() const;
[[nodiscard]] bool mesh_has_colocated_points() const;

InspectionIssues< std::vector< index_t > >
[[nodiscard]] InspectionIssues< std::vector< index_t > >
colocated_points_groups() const;

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ namespace geode
"different positions"
};

std::string string() const;
[[nodiscard]] std::string string() const;

std::string inspection_type() const;
[[nodiscard]] std::string inspection_type() const;
};

/*!
Expand All @@ -66,11 +66,13 @@ namespace geode

~UniqueVerticesColocation();

bool model_has_unique_vertices_linked_to_different_points() const;
[[nodiscard]] bool
model_has_unique_vertices_linked_to_different_points() const;

bool model_has_colocated_unique_vertices() const;
[[nodiscard]] bool model_has_colocated_unique_vertices() const;

UniqueVerticesInspectionResult inspect_unique_vertices() const;
[[nodiscard]] UniqueVerticesInspectionResult
inspect_unique_vertices() const;

private:
IMPLEMENTATION_MEMBER( impl_ );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ namespace geode
"BRep component meshes with degenerated polyhedra"
};

std::string string() const;
[[nodiscard]] std::string string() const;

std::string inspection_type() const;
[[nodiscard]] std::string inspection_type() const;
};

/*!
Expand All @@ -69,7 +69,7 @@ namespace geode

~BRepComponentMeshesDegeneration();

BRepMeshesDegenerationInspectionResult
[[nodiscard]] BRepMeshesDegenerationInspectionResult
inspect_elements_degeneration() const;

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ namespace geode

~EdgedCurveDegeneration();

bool is_mesh_degenerated() const;
[[nodiscard]] bool is_mesh_degenerated() const;

InspectionIssues< index_t > degenerated_edges() const;
[[nodiscard]] InspectionIssues< index_t > degenerated_edges() const;

private:
IMPLEMENTATION_MEMBER( impl_ );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ namespace geode
"Section component meshes with degenerated polygons"
};

std::string string() const;
[[nodiscard]] std::string string() const;

std::string inspection_type() const;
[[nodiscard]] std::string inspection_type() const;
};

/*!
Expand All @@ -66,7 +66,7 @@ namespace geode

~SectionComponentMeshesDegeneration();

SectionMeshesDegenerationInspectionResult
[[nodiscard]] SectionMeshesDegenerationInspectionResult
inspect_elements_degeneration() const;

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ namespace geode

~SolidMeshDegeneration();

bool is_mesh_degenerated() const;
[[nodiscard]] bool is_mesh_degenerated() const;

InspectionIssues< index_t > degenerated_edges() const;
[[nodiscard]] InspectionIssues< index_t > degenerated_edges() const;

InspectionIssues< index_t > degenerated_polyhedra() const;
[[nodiscard]] InspectionIssues< index_t > degenerated_polyhedra() const;

private:
IMPLEMENTATION_MEMBER( impl_ );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ namespace geode

~SurfaceMeshDegeneration();

bool is_mesh_degenerated() const;
[[nodiscard]] bool is_mesh_degenerated() const;

InspectionIssues< index_t > degenerated_edges() const;
[[nodiscard]] InspectionIssues< index_t > degenerated_edges() const;

InspectionIssues< index_t > degenerated_polygons() const;
[[nodiscard]] InspectionIssues< index_t > degenerated_polygons() const;

private:
IMPLEMENTATION_MEMBER( impl_ );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ namespace geode
explicit ColocationImpl( const Mesh& mesh );

public:
bool mesh_has_colocated_points() const;
[[nodiscard]] bool mesh_has_colocated_points() const;

InspectionIssues< std::vector< index_t > >
[[nodiscard]] InspectionIssues< std::vector< index_t > >
colocated_points_groups() const;

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace geode
protected:
explicit ComponentMeshesAdjacency( const Model& model );

const Model& model() const;
[[nodiscard]] const Model& model() const;

private:
const Model& model_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace geode
protected:
explicit ComponentMeshesDegeneration( const Model& model );

const Model& model() const;
[[nodiscard]] const Model& model() const;

private:
const Model& model_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace geode
protected:
explicit ComponentMeshesManifold( const Model& model );

const Model& model() const;
[[nodiscard]] const Model& model() const;

private:
const Model& model_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ namespace geode
public:
virtual ~DegenerationImpl();

virtual bool is_mesh_degenerated() const;
[[nodiscard]] virtual bool is_mesh_degenerated() const;

InspectionIssues< index_t > degenerated_edges() const;
[[nodiscard]] InspectionIssues< index_t > degenerated_edges() const;

private:
bool edge_is_degenerated( index_t edge_index ) const;
[[nodiscard]] bool edge_is_degenerated( index_t edge_index ) const;

protected:
explicit DegenerationImpl( const Mesh& mesh );

const Mesh& mesh() const;
[[nodiscard]] const Mesh& mesh() const;

private:
const Mesh& mesh_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ namespace geode
std::pair< ComponentMeshElement, ComponentMeshElement > >
elements_intersections{ "Surface intersections." };

std::string string() const;
[[nodiscard]] std::string string() const;

std::string inspection_type() const;
[[nodiscard]] std::string inspection_type() const;
};

/*!
Expand All @@ -63,9 +63,10 @@ namespace geode

~ModelMeshesIntersections();

bool model_has_intersecting_surfaces() const;
[[nodiscard]] bool model_has_intersecting_surfaces() const;

ElementsIntersectionsInspectionResult inspect_intersections() const;
[[nodiscard]] ElementsIntersectionsInspectionResult
inspect_intersections() const;

private:
IMPLEMENTATION_MEMBER( impl_ );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ namespace geode

~SurfaceCurveIntersections();

bool meshes_have_intersections() const;
[[nodiscard]] bool meshes_have_intersections() const;

/* Returns all pairs of intersecting triangles and edges.
* First element of each pair is a triangle index in the
* TriangulatedSurface, second element of each pair is an edge index in
* the EdgedCurve.
*/
InspectionIssues< std::pair< index_t, index_t > >
[[nodiscard]] InspectionIssues< std::pair< index_t, index_t > >
intersecting_elements() const;

private:
Expand Down
Loading

0 comments on commit 8c80bab

Please sign in to comment.