OLD | NEW |
1 unchanged: | 1 unchanged: |
2 --- protobuf-cleaned/src/google/protobuf/arenastring.cc 2015-12-30 13:21:46.0000
00000 -0800 | 2 --- protobuf-cleaned/src/google/protobuf/arenastring.cc 2015-12-30 13:21:46.0000
00000 -0800 |
3 +++ protobuf-patched/src/google/protobuf/arenastring.cc 2016-03-31 13:25:40.8880
06485 -0700 | 3 +++ protobuf-patched/src/google/protobuf/arenastring.cc 2016-03-31 13:25:40.8880
06485 -0700 |
4 @@ -48,6 +48,23 @@ | 4 @@ -48,6 +48,23 @@ |
5 } | 5 } |
6 } | 6 } |
7 | 7 |
8 +::std::string* ArenaStringPtr::MutableNoArena( | 8 +::std::string* ArenaStringPtr::MutableNoArena( |
9 + const ::std::string* default_value) { | 9 + const ::std::string* default_value) { |
10 + if (ptr_ == default_value) { | 10 + if (ptr_ == default_value) { |
(...skipping 11 matching lines...) Expand all Loading... |
22 +} | 22 +} |
23 + | 23 + |
24 + | 24 + |
25 } // namespace internal | 25 } // namespace internal |
26 } // namespace protobuf | 26 } // namespace protobuf |
27 } // namespace google | 27 } // namespace google |
28 only in patch2: | 28 only in patch2: |
29 unchanged: | 29 unchanged: |
30 --- protobuf-cleaned/src/google/protobuf/arenastring.h 2015-12-30 13:21:46.0000
00000 -0800 | 30 --- protobuf-cleaned/src/google/protobuf/arenastring.h 2015-12-30 13:21:46.0000
00000 -0800 |
31 +++ protobuf-patched/src/google/protobuf/arenastring.h 2016-03-31 13:25:40.8880
06485 -0700 | 31 +++ protobuf-patched/src/google/protobuf/arenastring.h 2016-03-31 13:25:40.8880
06485 -0700 |
32 @@ -214,12 +214,7 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr { | 32 @@ -219,12 +219,7 @@ |
33 | 33 return *ptr_; |
34 inline const ::std::string& GetNoArena() const { return *ptr_; } | 34 } |
35 | 35 |
36 - inline ::std::string* MutableNoArena(const ::std::string* default_value) { | 36 - inline ::std::string* MutableNoArena(const ::std::string* default_value) { |
37 - if (ptr_ == default_value) { | 37 - if (ptr_ == default_value) { |
38 - CreateInstanceNoArena(default_value); | 38 - CreateInstanceNoArena(default_value); |
39 - } | 39 - } |
40 - return ptr_; | 40 - return ptr_; |
41 - } | 41 - } |
42 + ::std::string* MutableNoArena(const ::std::string* default_value); | 42 + ::std::string* MutableNoArena(const ::std::string* default_value); |
43 | 43 |
44 inline ::std::string* ReleaseNoArena(const ::std::string* default_value) { | 44 inline ::std::string* ReleaseNoArena(const ::std::string* default_value) { |
45 if (ptr_ == default_value) { | 45 if (ptr_ == default_value) { |
46 @@ -243,11 +238,7 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr { | 46 @@ -248,12 +243,7 @@ |
47 } | 47 } |
48 } | 48 } |
49 | 49 |
50 - inline void DestroyNoArena(const ::std::string* default_value) { | 50 - inline void DestroyNoArena(const ::std::string* default_value) { |
51 - if (ptr_ != default_value) { | 51 - if (ptr_ != default_value) { |
52 - delete ptr_; | 52 - delete ptr_; |
53 - } | 53 - } |
| 54 - ptr_ = NULL; |
54 - } | 55 - } |
55 + void DestroyNoArena(const ::std::string* default_value); | 56 + void DestroyNoArena(const ::std::string* default_value); |
56 | 57 |
57 inline void ClearToEmptyNoArena(const ::std::string* default_value) { | 58 inline void ClearToEmptyNoArena(const ::std::string* default_value) { |
58 if (ptr_ == default_value) { | 59 if (ptr_ == default_value) { |
OLD | NEW |