Suppress bogus MSVC analysis warnings

This commit is contained in:
Victor Zverovich 2020-04-22 07:51:25 -07:00
parent 3f79357ef0
commit 56bc86ffac
2 changed files with 2 additions and 1 deletions

View File

@ -660,6 +660,7 @@ template <typename T> class buffer {
protected: protected:
// Don't initialize ptr_ since it is not accessed to save a few cycles. // Don't initialize ptr_ since it is not accessed to save a few cycles.
FMT_SUPPRESS_MSC_WARNING(26495)
buffer(std::size_t sz) FMT_NOEXCEPT : size_(sz), capacity_(sz) {} buffer(std::size_t sz) FMT_NOEXCEPT : size_(sz), capacity_(sz) {}
buffer(T* p = nullptr, std::size_t sz = 0, std::size_t cap = 0) FMT_NOEXCEPT buffer(T* p = nullptr, std::size_t sz = 0, std::size_t cap = 0) FMT_NOEXCEPT

View File

@ -1640,7 +1640,7 @@ template <typename Range> class basic_writer {
UIntPtr value; UIntPtr value;
int num_digits; int num_digits;
size_t size() const { return to_unsigned(num_digits) + 2; } size_t size() const { return to_unsigned(num_digits) + size_t(2); }
size_t width() const { return size(); } size_t width() const { return size(); }
template <typename It> void operator()(It&& it) const { template <typename It> void operator()(It&& it) const {