aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJisi Liu <jisi.liu@gmail.com>2015-03-01 21:34:49 -0800
committerJisi Liu <jisi.liu@gmail.com>2015-03-01 21:34:49 -0800
commit329fa02b429d0bc7516e4f27063d0e9fbb26f57f (patch)
treec2733a597d7366b4bb95eb79bcd8fea42fbd556c /src
parentf0e8df3b668f0760c0febc1656a69a3237cd9550 (diff)
downloadprotobuf-329fa02b429d0bc7516e4f27063d0e9fbb26f57f.tar.gz
protobuf-329fa02b429d0bc7516e4f27063d0e9fbb26f57f.tar.bz2
protobuf-329fa02b429d0bc7516e4f27063d0e9fbb26f57f.zip
Initialize data members in constructors instead of direct initialize in
class definition, which is a C++11 extension. Change-Id: I477fe484d737f4c60c519d68f431940ffaa33431
Diffstat (limited to 'src')
-rw-r--r--src/google/protobuf/map_entry_lite.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/google/protobuf/map_entry_lite.h b/src/google/protobuf/map_entry_lite.h
index 0602d847..304fba88 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_;