Skip to content

Commit

Permalink
Fix unreachable warning by marking it as such (#857)
Browse files Browse the repository at this point in the history
  • Loading branch information
riclarsson authored Nov 6, 2024
2 parents 4e4849c + e91e33e commit ebce23a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/lbl/lbl_zeeman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,8 @@ Propmat norm_view(pol p, Vector3 mag, Vector2 los) {
-2 * ST * ST * C2E};
case pol::no: return {1, 0, 0, 0, 0, 0, 0};
}

std::unreachable();
}

Propmat dnorm_view_du(pol p, Vector3 mag, Vector2 los) {
Expand Down Expand Up @@ -522,6 +524,8 @@ Propmat dnorm_view_du(pol p, Vector3 mag, Vector2 los) {
4 * (S2E * ST * deta - C2E * CT * dtheta) * ST};
case pol::no: return {0, 0, 0, 0, 0, 0, 0};
}

std::unreachable();
}

Propmat dnorm_view_dv(pol p, Vector3 mag, Vector2 los) {
Expand Down Expand Up @@ -564,6 +568,8 @@ Propmat dnorm_view_dv(pol p, Vector3 mag, Vector2 los) {
4 * (S2E * ST * deta - C2E * CT * dtheta) * ST};
case pol::no: return {0, 0, 0, 0, 0, 0, 0};
}

std::unreachable();
}

Propmat dnorm_view_dw(pol p, Vector3 mag, Vector2 los) {
Expand Down Expand Up @@ -606,5 +612,7 @@ Propmat dnorm_view_dw(pol p, Vector3 mag, Vector2 los) {
4 * (S2E * ST * deta - C2E * CT * dtheta) * ST};
case pol::no: return {0, 0, 0, 0, 0, 0, 0};
}

std::unreachable();
}
} // namespace lbl::zeeman

0 comments on commit ebce23a

Please sign in to comment.