int_traits -> uint32_or_64_t

This commit is contained in:
Victor Zverovich
2019-07-03 16:01:21 -07:00
parent 1289782f06
commit c286ffc88d
4 changed files with 10 additions and 15 deletions
+1 -2
View File
@@ -158,8 +158,7 @@ template <typename Char> class printf_width_handler {
template <typename T, FMT_ENABLE_IF(std::is_integral<T>::value)>
unsigned operator()(T value) {
typedef typename internal::int_traits<T>::main_type UnsignedType;
UnsignedType width = static_cast<UnsignedType>(value);
auto width = static_cast<uint32_or_64_t<T>>(value);
if (internal::is_negative(value)) {
spec_.align_ = ALIGN_LEFT;
width = 0 - width;