aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/generated_message_util.cc
diff options
context:
space:
mode:
authorBo Yang <teboring@google.com>2016-09-19 13:45:07 -0700
committerBo Yang <teboring@google.com>2016-10-10 11:23:36 -0700
commitcc8ca5b6a5478b40546d4206392eb1471454460d (patch)
treec0b45abfa16d7d373a6ea8f7fe50f1de00ab938e /src/google/protobuf/generated_message_util.cc
parent337a028bb65ccca4dda768695950b5aba53ae2c9 (diff)
downloadprotobuf-cc8ca5b6a5478b40546d4206392eb1471454460d.tar.gz
protobuf-cc8ca5b6a5478b40546d4206392eb1471454460d.tar.bz2
protobuf-cc8ca5b6a5478b40546d4206392eb1471454460d.zip
Integrate internal changes
Diffstat (limited to 'src/google/protobuf/generated_message_util.cc')
-rw-r--r--src/google/protobuf/generated_message_util.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/google/protobuf/generated_message_util.cc b/src/google/protobuf/generated_message_util.cc
index 7ad6d61c..73f55927 100644
--- a/src/google/protobuf/generated_message_util.cc
+++ b/src/google/protobuf/generated_message_util.cc
@@ -48,15 +48,15 @@ double NaN() {
return std::numeric_limits<double>::quiet_NaN();
}
-const ::std::string* empty_string_;
+ExplicitlyConstructed< ::std::string> fixed_address_empty_string;
GOOGLE_PROTOBUF_DECLARE_ONCE(empty_string_once_init_);
void DeleteEmptyString() {
- delete empty_string_;
+ GetEmptyStringAlreadyInited().~string();
}
void InitEmptyString() {
- empty_string_ = new string;
+ fixed_address_empty_string.DefaultConstruct();
OnShutdown(&DeleteEmptyString);
}