Fix MSVC warnings
This commit is contained in:
+2
-1
@@ -164,7 +164,8 @@ class WidthHandler : public ArgVisitor<WidthHandler, unsigned> {
|
||||
spec_.align_ = ALIGN_LEFT;
|
||||
width = 0 - width;
|
||||
}
|
||||
if (width > std::numeric_limits<int>::max())
|
||||
unsigned int_max = std::numeric_limits<int>::max();
|
||||
if (width > int_max)
|
||||
FMT_THROW(FormatError("number is too big"));
|
||||
return static_cast<unsigned>(width);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user