aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/protobuf/3.2.0/src/google/protobuf/arenastring.h
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/protobuf/3.2.0/src/google/protobuf/arenastring.h')
-rwxr-xr-xthird_party/protobuf/3.2.0/src/google/protobuf/arenastring.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/third_party/protobuf/3.2.0/src/google/protobuf/arenastring.h b/third_party/protobuf/3.2.0/src/google/protobuf/arenastring.h
index a7efb7529b..63fd00e567 100755
--- a/third_party/protobuf/3.2.0/src/google/protobuf/arenastring.h
+++ b/third_party/protobuf/3.2.0/src/google/protobuf/arenastring.h
@@ -310,5 +310,21 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr {
+namespace protobuf {
+namespace internal {
+
+inline void ArenaStringPtr::AssignWithDefault(const ::std::string* default_value,
+ ArenaStringPtr value) {
+ const ::std::string* me = *UnsafeRawStringPointer();
+ const ::std::string* other = *value.UnsafeRawStringPointer();
+ // If the pointers are the same then do nothing.
+ if (me != other) {
+ SetNoArena(default_value, value.GetNoArena());
+ }
+}
+
+} // namespace internal
+} // namespace protobuf
+
} // namespace google
#endif // GOOGLE_PROTOBUF_ARENASTRING_H__