Commit cfeba45c authored by Victor Zverovich's avatar Victor Zverovich

Let the buffer grow as it pleases.

parent 33baa8f3
......@@ -360,7 +360,9 @@ void fmt::BasicWriter<Char>::FormatDouble(
GrowBuffer(n);
return;
}
buffer_.reserve(n >= 0 ? offset + n + 1 : 2 * buffer_.capacity());
// If n is negative we ask to increase the capacity by at least 1,
// but as std::vector, the buffer grows exponentially.
buffer_.reserve(n >= 0 ? offset + n + 1 : buffer_.capacity() + 1);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment