mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-08 02:28:15 +00:00
Fix more warnings
This commit is contained in:
parent
be7d72ba0d
commit
77c892c88e
@ -67,7 +67,7 @@ class IsZeroInt {
|
|||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename std::enable_if<!std::is_integral<T>::value, bool>::type
|
typename std::enable_if<!std::is_integral<T>::value, bool>::type
|
||||||
operator()(T value) { return false; }
|
operator()(T) { return false; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T, typename U>
|
template <typename T, typename U>
|
||||||
@ -103,7 +103,6 @@ class ArgConverter {
|
|||||||
bool is_signed = type_ == 'd' || type_ == 'i';
|
bool is_signed = type_ == 'd' || type_ == 'i';
|
||||||
typedef typename internal::conditional<
|
typedef typename internal::conditional<
|
||||||
is_same<T, void>::value, U, T>::type TargetType;
|
is_same<T, void>::value, U, T>::type TargetType;
|
||||||
typedef basic_context<Char> context;
|
|
||||||
if (sizeof(TargetType) <= sizeof(int)) {
|
if (sizeof(TargetType) <= sizeof(int)) {
|
||||||
// Extra casts are used to silence warnings.
|
// Extra casts are used to silence warnings.
|
||||||
if (is_signed) {
|
if (is_signed) {
|
||||||
@ -128,8 +127,7 @@ class ArgConverter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename U>
|
template <typename U>
|
||||||
typename std::enable_if<!std::is_integral<U>::value>::type
|
typename std::enable_if<!std::is_integral<U>::value>::type operator()(U) {
|
||||||
operator()(U value) {
|
|
||||||
// No coversion needed for non-integral types.
|
// No coversion needed for non-integral types.
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -197,7 +195,7 @@ class PrintfWidthHandler {
|
|||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename std::enable_if<!std::is_integral<T>::value, unsigned>::type
|
typename std::enable_if<!std::is_integral<T>::value, unsigned>::type
|
||||||
operator()(T value) {
|
operator()(T) {
|
||||||
FMT_THROW(format_error("width is not integer"));
|
FMT_THROW(format_error("width is not integer"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user