Browse Source

Added stubs/map_util.h to list of installed headers

This should fix issue #6186. I also had to remove a couple unnecessary
const keywords in map_util.h because the no_warning_test was showing
errors about those.
Adam Cozzette 6 years ago
parent
commit
4aa77508a6
2 changed files with 3 additions and 2 deletions
  1. 1 0
      src/Makefile.am
  2. 2 2
      src/google/protobuf/stubs/map_util.h

+ 1 - 0
src/Makefile.am

@@ -72,6 +72,7 @@ nobase_include_HEADERS =                                         \
   google/protobuf/stubs/hash.h                                   \
   google/protobuf/stubs/hash.h                                   \
   google/protobuf/stubs/logging.h                                \
   google/protobuf/stubs/logging.h                                \
   google/protobuf/stubs/macros.h                                 \
   google/protobuf/stubs/macros.h                                 \
+  google/protobuf/stubs/map_util.h                               \
   google/protobuf/stubs/mutex.h                                  \
   google/protobuf/stubs/mutex.h                                  \
   google/protobuf/stubs/once.h                                   \
   google/protobuf/stubs/once.h                                   \
   google/protobuf/stubs/platform_macros.h                        \
   google/protobuf/stubs/platform_macros.h                        \

+ 2 - 2
src/google/protobuf/stubs/map_util.h

@@ -620,7 +620,7 @@ bool UpdateReturnCopy(Collection* const collection,
 // twice. Unlike UpdateReturnCopy this also does not come with the issue of an
 // twice. Unlike UpdateReturnCopy this also does not come with the issue of an
 // undefined previous* in case new data was inserted.
 // undefined previous* in case new data was inserted.
 template <class Collection>
 template <class Collection>
-typename Collection::value_type::second_type* const
+typename Collection::value_type::second_type*
 InsertOrReturnExisting(Collection* const collection,
 InsertOrReturnExisting(Collection* const collection,
                        const typename Collection::value_type& vt) {
                        const typename Collection::value_type& vt) {
   std::pair<typename Collection::iterator, bool> ret = collection->insert(vt);
   std::pair<typename Collection::iterator, bool> ret = collection->insert(vt);
@@ -633,7 +633,7 @@ InsertOrReturnExisting(Collection* const collection,
 
 
 // Same as above, except for explicit key and data.
 // Same as above, except for explicit key and data.
 template <class Collection>
 template <class Collection>
-typename Collection::value_type::second_type* const
+typename Collection::value_type::second_type*
 InsertOrReturnExisting(
 InsertOrReturnExisting(
     Collection* const collection,
     Collection* const collection,
     const typename Collection::value_type::first_type& key,
     const typename Collection::value_type::first_type& key,