projects
/
platform
/
upstream
/
flatbuffers.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
671c949
)
Fix use of std::max when Windows.h is imported.
author
Chris
<chris@yourdreamnet.co.uk>
Fri, 27 Nov 2015 20:06:41 +0000
(20:06 +0000)
committer
Wouter van Oortmerssen
<wvo@google.com>
Wed, 2 Dec 2015 19:12:39 +0000
(11:12 -0800)
include/flatbuffers/flatbuffers.h
patch
|
blob
|
history
diff --git
a/include/flatbuffers/flatbuffers.h
b/include/flatbuffers/flatbuffers.h
index
c2b938d
..
2af4486
100644
(file)
--- a/
include/flatbuffers/flatbuffers.h
+++ b/
include/flatbuffers/flatbuffers.h
@@
-445,7
+445,7
@@
class vector_downward {
if (len > static_cast<size_t>(cur_ - buf_)) {
auto old_size = size();
auto largest_align = AlignOf<largest_scalar_t>();
- reserved_ +=
std::max
(len, growth_policy(reserved_));
+ reserved_ +=
(std::max)
(len, growth_policy(reserved_));
// Round up to avoid undefined behavior from unaligned loads and stores.
reserved_ = (reserved_ + (largest_align - 1)) & ~(largest_align - 1);
auto new_buf = allocator_.allocate(reserved_);