Skip to content

Commit

Permalink
fix : enum unsafety -> abort()
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaslepoix committed Jul 18, 2022
1 parent a569fc4 commit 6ae4383
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/domain/conflicts/conflict_colinear_edges.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ void ConflictColinearEdges::auto_solve(MeshlinePolicyManager& line_policy_manage
switch(axis.value()) {
case MeshlinePolicy::Axis::H: return Normal::YMIN;
case MeshlinePolicy::Axis::V: return Normal::XMIN;
default: abort();
}
} ();
meshline_policy = line_policy_manager.add_meshline_policy(
Expand All @@ -77,6 +78,7 @@ void ConflictColinearEdges::auto_solve(MeshlinePolicyManager& line_policy_manage
switch(axis.value()) {
case MeshlinePolicy::Axis::H: return Normal::YMAX;
case MeshlinePolicy::Axis::V: return Normal::XMAX;
default: abort();
}
} ();
meshline_policy = line_policy_manager.add_meshline_policy(
Expand Down
2 changes: 1 addition & 1 deletion src/domain/geometrics/relation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ namespace relation {
//******************************************************************************
PolygonPoint cast(PolygonSegment const a) {
switch(a) {
default: [[fallthrough]];
case PolygonSegment::IN: return PolygonPoint::IN;
case PolygonSegment::ON: return PolygonPoint::ON;
case PolygonSegment::OUT: return PolygonPoint::OUT;
default: abort();
}
}

Expand Down
1 change: 1 addition & 0 deletions src/domain/mesh/meshline_policy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@ Coord coord(Point const& point, MeshlinePolicy::Axis const axis) noexcept {
switch(axis) {
case MeshlinePolicy::Axis::H: return point.y;
case MeshlinePolicy::Axis::V: return point.x;
default: abort();
}
}
1 change: 1 addition & 0 deletions src/domain/meshline_policy_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,6 @@ GridAxis cast(MeshlinePolicy::Axis const a) noexcept {
switch(a) {
case MeshlinePolicy::Axis::H: return H;
case MeshlinePolicy::Axis::V: return V;
default: abort();
}
}

0 comments on commit 6ae4383

Please sign in to comment.