From 94aa50ffd6e8994c1ec9c09cc596ec77692e6be7 Mon Sep 17 00:00:00 2001 From: Jisi Liu Date: Thu, 31 Mar 2016 13:18:03 -0700 Subject: Fix breakage of referring to table_ in static func Referencing data member table_ in static functions break certain platforms. Change it to refer to the declare type void** instead. --- src/google/protobuf/map.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/google/protobuf/map.h b/src/google/protobuf/map.h index b5f34042..3ee4ea76 100644 --- a/src/google/protobuf/map.h +++ b/src/google/protobuf/map.h @@ -935,7 +935,7 @@ class Map { const hasher& hash_function() const { return *this; } static size_type max_size() { - return static_cast(1) << (sizeof(table_) >= 8 ? 60 : 28); + return static_cast(1) << (sizeof(void**) >= 8 ? 60 : 28); } size_type size() const { return num_elements_; } bool empty() const { return size() == 0; } -- cgit v1.2.3