diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2014-11-14 11:50:31 -0800 |
---|---|---|
committer | Feng Xiao <xfxyjwf@gmail.com> | 2014-11-14 11:50:31 -0800 |
commit | f157a5651c79a7a36e242af216a5d5b383ba8af2 (patch) | |
tree | 368bb0ca0e89ab7514302e4df00435a4ef461a28 /src/google/protobuf/repeated_field.h | |
parent | faf581d20866ad5e586b3e515f6c547d2dcec2c1 (diff) |
Down-integrate from internal code base (C++ maps support).
Diffstat (limited to 'src/google/protobuf/repeated_field.h')
-rw-r--r-- | src/google/protobuf/repeated_field.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/google/protobuf/repeated_field.h b/src/google/protobuf/repeated_field.h index d5427e22..e14dcc62 100644 --- a/src/google/protobuf/repeated_field.h +++ b/src/google/protobuf/repeated_field.h @@ -86,7 +86,7 @@ inline int CalculateReserve(Iter begin, Iter end, std::forward_iterator_tag) { template <typename Iter> inline int CalculateReserve(Iter /*begin*/, Iter /*end*/, - std::input_iterator_tag) { + std::input_iterator_tag /*unused*/) { return -1; } @@ -349,6 +349,11 @@ class LIBPROTOBUF_EXPORT RepeatedPtrFieldBase { // use of AddFromCleared(), which is not part of the public interface. friend class ExtensionSet; + // The MapFieldBase implementation needs to call protected methods directly, + // reinterpreting pointers as being to Message instead of a specific Message + // subclass. + friend class MapFieldBase; + // To parse directly into a proto2 generated class, the upb class GMR_Handlers // needs to be able to modify a RepeatedPtrFieldBase directly. friend class LIBPROTOBUF_EXPORT upb::google_opensource::GMR_Handlers; |