Skip to content

Commit

Permalink
Fix unreachable return warning in comparison trait
Browse files Browse the repository at this point in the history
Update RPY_UNREACHABLE_RETURN to return false instead of void to eliminate unreachable return warning in the ComparisonTraitImpl class. This ensures compliance with modern compiler standards and improves code robustness.
  • Loading branch information
inakleinbottle committed Nov 26, 2024
1 parent 6c98424 commit 6de9d23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platform/include/roughpy/generics/comparison_trait.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ bool ComparisonTraitImpl<T>::has_comparison(ComparisonType comp) const noexcept
return dtl::has_greater_equal_test_v<T>
|| (dtl::has_greater_test_v<T> && dtl::has_equal_test_v<T>);
}
RPY_UNREACHABLE_RETURN();
RPY_UNREACHABLE_RETURN(false);
}
template <typename T>
bool ComparisonTraitImpl<T>::unsafe_compare_equal(
Expand Down

0 comments on commit 6de9d23

Please sign in to comment.