From 329fa02b429d0bc7516e4f27063d0e9fbb26f57f Mon Sep 17 00:00:00 2001 From: Jisi Liu Date: Sun, 1 Mar 2015 21:34:49 -0800 Subject: [PATCH] Initialize data members in constructors instead of direct initialize in class definition, which is a C++11 extension. Change-Id: I477fe484d737f4c60c519d68f431940ffaa33431 --- src/google/protobuf/map_entry_lite.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/google/protobuf/map_entry_lite.h b/src/google/protobuf/map_entry_lite.h index 0602d8479f..304fba880f 100644 --- a/src/google/protobuf/map_entry_lite.h +++ b/src/google/protobuf/map_entry_lite.h @@ -359,7 +359,7 @@ class LIBPROTOBUF_EXPORT MapEntryLite : public MessageLite { typedef void DestructorSkippable_; }; - MapEntryLite() : arena_(NULL) { + MapEntryLite() : default_instance_(NULL), arena_(NULL) { KeyCppHandler::Initialize(&key_, NULL); ValueCppHandler::InitializeMaybeByDefaultEnum( &value_, default_enum_value, NULL); @@ -367,7 +367,7 @@ class LIBPROTOBUF_EXPORT MapEntryLite : public MessageLite { } explicit MapEntryLite(Arena* arena) - : arena_(arena) { + : default_instance_(NULL), arena_(arena) { KeyCppHandler::Initialize(&key_, arena); ValueCppHandler::InitializeMaybeByDefaultEnum( &value_, default_enum_value, arena); @@ -382,7 +382,7 @@ class LIBPROTOBUF_EXPORT MapEntryLite : public MessageLite { default_instance_ = default_instance; } - MapEntryLite* default_instance_ = NULL; + MapEntryLite* default_instance_; KeyBase key_; ValueBase value_;