diff --git a/format.h b/format.h index c80ec50a..211c1a3c 100644 --- a/format.h +++ b/format.h @@ -101,7 +101,7 @@ class Array { template void Array::Grow(std::size_t size) { - capacity_ = std::max(size, capacity_ + capacity_ / 2); + capacity_ = (std::max)(size, capacity_ + capacity_ / 2); T *p = new T[capacity_]; std::copy(ptr_, ptr_ + size_, p); if (ptr_ != data_) @@ -657,7 +657,7 @@ void BasicWriter::FormatDouble( std::size_t offset = buffer_.size(); unsigned width = spec.width(); if (sign) { - buffer_.reserve(buffer_.size() + std::max(width, 1u)); + buffer_.reserve(buffer_.size() + (std::max)(width, 1u)); if (width > 0) --width; ++offset;