summaryrefslogtreecommitdiff
path: root/cpputil
diff options
context:
space:
mode:
authorMartin Thomson <martin.thomson@gmail.com>2017-05-04 13:15:24 +1000
committerMartin Thomson <martin.thomson@gmail.com>2017-05-04 13:15:24 +1000
commitfb8aad6f2c292af76464265ba28a4ae2b10dcdae (patch)
tree07fa0b10e759b55bef7c8696c433391ae8ea69fe /cpputil
parent3c633ada1a00dedebafa34c529f8c12491c018d4 (diff)
parenta8f27fa2274e2d40f61a6fea03cd6b5a930c4563 (diff)
downloadnss-hg-fb8aad6f2c292af76464265ba28a4ae2b10dcdae.tar.gz
Merging from main NSS branch
Diffstat (limited to 'cpputil')
-rw-r--r--cpputil/databuffer.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/cpputil/databuffer.h b/cpputil/databuffer.h
index e7236d4e9..287cbb2a7 100644
--- a/cpputil/databuffer.h
+++ b/cpputil/databuffer.h
@@ -46,7 +46,7 @@ class DataBuffer {
len_ = len;
}
- void Truncate(size_t len) { len_ = std::min(len_, len); }
+ void Truncate(size_t len) { len_ = (std::min)(len_, len); }
void Assign(const DataBuffer& other) { Assign(other.data(), other.len()); }
@@ -126,14 +126,14 @@ class DataBuffer {
size_t old_len = len_;
// The amount of stuff remaining from the tail of the old.
- size_t tail_len = old_len - std::min(old_len, index + remove);
+ size_t tail_len = old_len - (std::min)(old_len, index + remove);
// The new length: the head of the old, the new, and the tail of the old.
len_ = index + ins_len + tail_len;
data_ = new uint8_t[len_ ? len_ : 1];
// The head of the old.
if (old_value) {
- Write(0, old_value, std::min(old_len, index));
+ Write(0, old_value, (std::min)(old_len, index));
}
// Maybe a gap.
if (old_value && index > old_len) {