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.
pull/1365/head
Jisi Liu 9 years ago
parent 9e7fa0678d
commit 94aa50ffd6
  1. 2
      src/google/protobuf/map.h

@ -935,7 +935,7 @@ class Map {
const hasher& hash_function() const { return *this; } const hasher& hash_function() const { return *this; }
static size_type max_size() { static size_type max_size() {
return static_cast<size_type>(1) << (sizeof(table_) >= 8 ? 60 : 28); return static_cast<size_type>(1) << (sizeof(void**) >= 8 ? 60 : 28);
} }
size_type size() const { return num_elements_; } size_type size() const { return num_elements_; }
bool empty() const { return size() == 0; } bool empty() const { return size() == 0; }

Loading…
Cancel
Save