From 6da2c530990ecc5696191972522cc0db01ffa827 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Mon, 22 Apr 2013 07:39:36 -0700 Subject: [PATCH] Fix compilation when windows.h is included (issue 2) --- format.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;