浏览代码

Simplify the Element dtor invocation when freeing elements in
InternalDeallocate to avoid confusing the compiler when there's
a class named Element already defined in the global namespace.

Michael Allen 8 年之前
父节点
当前提交
2240a785f9
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/google/protobuf/repeated_field.h

+ 1 - 1
src/google/protobuf/repeated_field.h

@@ -291,7 +291,7 @@ class RepeatedField PROTOBUF_FINAL {
       Element* e = &rep->elements[0];
       Element* limit = &rep->elements[size];
       for (; e < limit; e++) {
-        e->Element::~Element();
+        e->~Element();
       }
       if (rep->arena == NULL) {
 #if defined(__GXX_DELETE_WITH_SIZE__) || defined(__cpp_sized_deallocation)