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
2019-10-23 03:13:03 +03:00
committed by Victor Zverovich
parent 00669427df
commit 21acc2af43
3 changed files with 7 additions and 8 deletions

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 {