Merge pull request #9144 from appledragon/master

for windows build fail issue, confliction with std max
This commit is contained in:
deannagarcia 2021-10-25 14:30:45 -07:00 committed by GitHub
commit d630f96dce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,7 @@ inline void STLStringResizeUninitializedAmortized(std::string* s,
const size_t cap = s->capacity();
if (new_size > cap) {
// Make sure to always grow by at least a factor of 2x.
s->reserve(std::max(new_size, 2 * cap));
s->reserve(std::max<size_t>(new_size, 2 * cap));
}
STLStringResizeUninitialized(s, new_size);
}