Skip to content

Commit

Permalink
Fix compilation when windows.h is included (issue 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Apr 22, 2013
1 parent c7f2c65 commit 6da2c53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions format.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class Array {

template <typename T, std::size_t SIZE>
void Array<T, SIZE>::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_)
Expand Down Expand Up @@ -657,7 +657,7 @@ void BasicWriter<Char>::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;
Expand Down

0 comments on commit 6da2c53

Please sign in to comment.