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:
parent
598e6042d1
commit
e950685455
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user