Эх сурвалжийг харах

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 жил өмнө
parent
commit
2240a785f9

+ 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)