summarylogtreecommitdiffstats
path: root/279c17d9c9eb9374c89489b449f92cb93350e8cd.patch
blob: f25d6fa43f356961408b95abf3aecaf910b47315 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
From 279c17d9c9eb9374c89489b449f92cb93350e8cd Mon Sep 17 00:00:00 2001
From: Abdelhak Bougouffa <abougouffa@fedoraproject.org>
Date: Tue, 25 May 2021 01:28:17 +0200
Subject: [PATCH] Fix GCC 11 compatibility issue

---
 include/pangolin/utils/picojson.h | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/include/pangolin/utils/picojson.h b/include/pangolin/utils/picojson.h
index 85252691..c6a596ff 100644
--- a/include/pangolin/utils/picojson.h
+++ b/include/pangolin/utils/picojson.h
@@ -270,8 +270,8 @@ class value {
 private:
     template <typename T> value(const T*); // intentionally defined to block implicit conversion of pointer to bool
     template <typename Iter> static void _indent(Iter os, int indent);
-    template <typename Iter> void _serialize(Iter os, int indent) const;
-    std::string _serialize(int indent) const;
+    template <typename Iter> void serialize_(Iter os, int indent) const;
+    std::string serialize_(int indent) const;
 };
 
 typedef value::array array;
@@ -561,11 +561,11 @@ template <typename Iter> void serialize_str(const std::string& s, Iter oi) {
 }
 
 template <typename Iter> void value::serialize(Iter oi, bool prettify) const {
-    return _serialize(oi, prettify ? 0 : -1);
+    return serialize_(oi, prettify ? 0 : -1);
 }
 
 inline std::string value::serialize(bool prettify) const {
-    return _serialize(prettify ? 0 : -1);
+    return serialize_(prettify ? 0 : -1);
 }
 
 template <typename Iter> void value::_indent(Iter oi, int indent) {
@@ -575,7 +575,7 @@ template <typename Iter> void value::_indent(Iter oi, int indent) {
     }
 }
 
-template <typename Iter> void value::_serialize(Iter oi, int indent) const {
+template <typename Iter> void value::serialize_(Iter oi, int indent) const {
     switch (type_) {
     case string_type:
         serialize_str(*u_.string_, oi);
@@ -594,7 +594,7 @@ template <typename Iter> void value::_serialize(Iter oi, int indent) const {
             if (indent != -1) {
                 _indent(oi, indent);
             }
-            i->_serialize(oi, indent);
+            i->serialize_(oi, indent);
         }
         if (indent != -1) {
             --indent;
@@ -624,7 +624,7 @@ template <typename Iter> void value::_serialize(Iter oi, int indent) const {
             if (indent != -1) {
                 *oi++ = ' ';
             }
-            i->second._serialize(oi, indent);
+            i->second.serialize_(oi, indent);
         }
         if (indent != -1) {
             --indent;
@@ -644,9 +644,9 @@ template <typename Iter> void value::_serialize(Iter oi, int indent) const {
     }
 }
 
-inline std::string value::_serialize(int indent) const {
+inline std::string value::serialize_(int indent) const {
     std::string s;
-    _serialize(std::back_inserter(s), indent);
+    serialize_(std::back_inserter(s), indent);
     return s;
 }