Fix MSVC warnings
This commit is contained in:
1 parent
a201c61977
commit
e0d6f630f8
2 files changed
+4
-2
No files matched your search
+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