diff --git a/src/google/protobuf/map.h b/src/google/protobuf/map.h index c16fbed228..96d2f2017d 100644 --- a/src/google/protobuf/map.h +++ b/src/google/protobuf/map.h @@ -176,14 +176,12 @@ class Map { template void destroy(NodeType* p) { - if (arena_ == NULL) p->~NodeType(); + p->~NodeType(); } #else void construct(pointer p, const_reference t) { new (p) value_type(t); } - void destroy(pointer p) { - if (arena_ == NULL) p->~value_type(); - } + void destroy(pointer p) { p->~value_type(); } #endif template @@ -201,10 +199,10 @@ class Map { return arena_ != other.arena_; } - // To support Visual Studio 2008 - size_type max_size() const { - return std::numeric_limits::max(); - } + // To support Visual Studio 2008 + size_type max_size() const { + return std::numeric_limits::max(); + } private: Arena* arena_;