Fix more Visual Studio 2019 pedantic warnings (#1371)

* format-inl.h(444,1): warning C4804: '>>': unsafe use of type 'bool' in operation
format.h(2808,1): warning C4127: conditional expression is constant

* More fixes for VS2019 pedantic warnings

* Fix "conditional expression is constant" VS2019 warning in more specific way

* Use const_check to silence constexpr warning
This commit is contained in:
Ivan Shynkarenka authored and Victor Zverovich committed 2019-10-22 17:13:03 -07:00
1 parent 00669427df
commit 21acc2af43
3 files changed
+7 -8

No files matched your search

-4
View File
@@ -16,10 +16,6 @@
FMT_BEGIN_NAMESPACE
namespace internal {
// A helper function to suppress bogus "conditional expression is constant"
// warnings.
template <typename T> inline T const_check(T value) { return value; }
// Checks if a value fits in int - used to avoid warnings about comparing
// signed and unsigned integers.
template <bool IsSigned> struct int_checker {