aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/map.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/map.h')
-rw-r--r--src/google/protobuf/map.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/google/protobuf/map.h b/src/google/protobuf/map.h
index 61a23897..e6d78b20 100644
--- a/src/google/protobuf/map.h
+++ b/src/google/protobuf/map.h
@@ -1290,7 +1290,9 @@ class Map {
// Return a power of two no less than max(kMinTableSize, n).
// Assumes either n < kMinTableSize or n is a power of two.
size_type TableSize(size_type n) {
- return n < kMinTableSize ? kMinTableSize : n;
+ return n < static_cast<size_type>(kMinTableSize)
+ ? static_cast<size_type>(kMinTableSize)
+ : n;
}
// Use alloc_ to allocate an array of n objects of type U.