Eliminate unreachable code warnings

The code following a `FMT_THROW` is unreachable since the exception does not return.  Some compilers (e.g. Nvidia) emit "Unreachable Code" warnings for this construct.  Since this is in an include file, the warning can be emitted many many times.
This commit is contained in:
Greg Sjaardema 2019-12-13 13:00:20 -07:00 committed by GitHub
parent 598e6042d1
commit e950685455
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,7 +46,6 @@ class printf_precision_handler {
template <typename T, FMT_ENABLE_IF(!std::is_integral<T>::value)>
int operator()(T) {
FMT_THROW(format_error("precision is not integer"));
return 0;
}
};
@ -167,7 +166,6 @@ template <typename Char> class printf_width_handler {
template <typename T, FMT_ENABLE_IF(!std::is_integral<T>::value)>
unsigned operator()(T) {
FMT_THROW(format_error("width is not integer"));
return 0;
}
};