aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/protobuf/protobuf/0001-Added-stubs-map_util.h-to-list-of-installed-headers.patch
blob: a160e5e9787019bf1d57349a18d608dede383077 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
From ea6e776e50971c89ad2293046b6ae2a6a9753c56 Mon Sep 17 00:00:00 2001
From: Adam Cozzette <acozzette@google.com>
Date: Thu, 6 Jun 2019 10:29:58 -0700
Subject: [PATCH] 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.

Upstream-Status: Submitted [https://github.com/protocolbuffers/protobuf/pull/6223]
---
 src/Makefile.am                      | 1 +
 src/google/protobuf/stubs/map_util.h | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index be18ba76..1689e221 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -72,6 +72,7 @@ nobase_include_HEADERS =                                         \
   google/protobuf/stubs/hash.h                                   \
   google/protobuf/stubs/logging.h                                \
   google/protobuf/stubs/macros.h                                 \
+  google/protobuf/stubs/map_util.h                               \
   google/protobuf/stubs/mutex.h                                  \
   google/protobuf/stubs/once.h                                   \
   google/protobuf/stubs/platform_macros.h                        \
diff --git a/src/google/protobuf/stubs/map_util.h b/src/google/protobuf/stubs/map_util.h
index 2313e1f5..b04d9d46 100644
--- a/src/google/protobuf/stubs/map_util.h
+++ b/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
 // undefined previous* in case new data was inserted.
 template <class Collection>
-typename Collection::value_type::second_type* const
+typename Collection::value_type::second_type*
 InsertOrReturnExisting(Collection* const collection,
                        const typename Collection::value_type& 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.
 template <class Collection>
-typename Collection::value_type::second_type* const
+typename Collection::value_type::second_type*
 InsertOrReturnExisting(
     Collection* const collection,
     const typename Collection::value_type::first_type& key,
--
2.11.0