diff options
Diffstat (limited to 'src/google/protobuf/map_entry_lite.h')
-rw-r--r-- | src/google/protobuf/map_entry_lite.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/google/protobuf/map_entry_lite.h b/src/google/protobuf/map_entry_lite.h index 7c477c56..1646ce43 100644 --- a/src/google/protobuf/map_entry_lite.h +++ b/src/google/protobuf/map_entry_lite.h @@ -34,6 +34,7 @@ #include <assert.h> #include <google/protobuf/arena.h> +#include <google/protobuf/arenastring.h> #include <google/protobuf/map.h> #include <google/protobuf/map_type_handler.h> #include <google/protobuf/stubs/port.h> @@ -603,7 +604,9 @@ template <> struct FromHelper<WireFormatLite::TYPE_STRING> { static ArenaStringPtr From(const string& x) { ArenaStringPtr res; - *res.UnsafeRawStringPointer() = const_cast<string*>(&x); + TaggedPtr< ::std::string> ptr; + ptr.Set(const_cast<string*>(&x)); + res.UnsafeSetTaggedPointer(ptr); return res; } }; @@ -611,7 +614,9 @@ template <> struct FromHelper<WireFormatLite::TYPE_BYTES> { static ArenaStringPtr From(const string& x) { ArenaStringPtr res; - *res.UnsafeRawStringPointer() = const_cast<string*>(&x); + TaggedPtr< ::std::string> ptr; + ptr.Set(const_cast<string*>(&x)); + res.UnsafeSetTaggedPointer(ptr); return res; } }; |