summaryrefslogtreecommitdiffstats
path: root/graphics/inkscape-gtk2/gcc9.patch
blob: c9106beb021c3fb9339cabe302c41f6a924a236d (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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
--- a/src/ui/dialog/document-properties.cpp.ORIG	2019-01-15 05:29:27.000000000 +0100
+++ b/src/ui/dialog/document-properties.cpp	2019-02-01 12:24:16.664281733 +0100
@@ -563,7 +563,7 @@
 }
 
 struct _cmp {
-  bool operator()(const SPObject * const & a, const SPObject * const & b)
+  bool operator()(const SPObject * const & a, const SPObject * const & b) const
   {
     const Inkscape::ColorProfile &a_prof = reinterpret_cast<const Inkscape::ColorProfile &>(*a);
     const Inkscape::ColorProfile &b_prof = reinterpret_cast<const Inkscape::ColorProfile &>(*b);
--- a/src/vanishing-point.h.ORIG	2019-05-14 11:10:14.069835323 +0200
+++ b/src/vanishing-point.h	2019-05-14 15:49:31.931911893 +0200
@@ -78,7 +78,7 @@
         return _persp = persp;
     }
 
-    inline bool hasBox (SPBox3D *box) {
+    inline bool hasBox (SPBox3D *box) const {
         return persp3d_has_box(_persp, box);
     }
     inline unsigned int numberOfBoxes() const {
@@ -104,7 +104,7 @@
         g_return_if_fail (_persp);
         persp3d_get_VP (_persp, _axis).print("");
     }
-    inline char const *axisString () { return Proj::string_from_axis(_axis); }
+    inline char const *axisString () const { return Proj::string_from_axis(_axis); }
 
     unsigned int my_counter;
     static unsigned int global_counter; // FIXME: Only to implement operator< so that we can merge lists. Do this in a better way!!
@@ -116,7 +116,7 @@
 struct VPDrag;
 
 struct less_ptr : public std::binary_function<VanishingPoint *, VanishingPoint *, bool> {
-    bool operator()(VanishingPoint *vp1, VanishingPoint *vp2) {
+    bool operator()(VanishingPoint *vp1, VanishingPoint *vp2) const {
         return GPOINTER_TO_INT(vp1) < GPOINTER_TO_INT(vp2);
     }
 };
@@ -144,8 +144,8 @@
     void updateTip();
 
     unsigned int numberOfBoxes(); // the number of boxes linked to all VPs of the dragger
-    VanishingPoint *findVPWithBox(SPBox3D *box);
-    std::set<VanishingPoint*, less_ptr> VPsOfSelectedBoxes();
+    VanishingPoint *findVPWithBox(SPBox3D *box) const;
+    std::set<VanishingPoint*, less_ptr> VPsOfSelectedBoxes() const;
 
     bool hasPerspective(const Persp3D *persp);
     void mergePerspectives(); // remove duplicate perspectives
--- a/src/vanishing-point.cpp.ORIG	2019-01-15 05:29:27.000000000 +0100
+++ b/src/vanishing-point.cpp	2019-05-14 16:01:07.035873590 +0200
@@ -382,17 +382,17 @@
 }
 
 VanishingPoint *
-VPDragger::findVPWithBox (SPBox3D *box) {
-    for (std::list<VanishingPoint>::iterator vp = vps.begin(); vp != vps.end(); ++vp) {
+VPDragger::findVPWithBox (SPBox3D *box) const {
+    for (std::list<VanishingPoint>::const_iterator vp = vps.begin(); vp != vps.end(); ++vp) {
         if ((*vp).hasBox(box)) {
-            return &(*vp);
+            return const_cast<VanishingPoint*>(&(*vp));
         }
     }
     return NULL;
 }
 
 std::set<VanishingPoint*, less_ptr>
-VPDragger::VPsOfSelectedBoxes() {
+VPDragger::VPsOfSelectedBoxes() const {
     std::set<VanishingPoint*, less_ptr> sel_vps;
     VanishingPoint *vp;
     // FIXME: Should we take the selection from the parent VPDrag? I guess it shouldn't make a difference.
@@ -402,7 +402,7 @@
         SPItem *item = *i;
         SPBox3D *box = dynamic_cast<SPBox3D *>(item);
         if (box) {
-            vp = this->findVPWithBox(box);
+            vp = const_cast<VPDragger*>(this)->findVPWithBox(box);
             if (vp) {
                 sel_vps.insert (vp);
             }
--- a/src/ui/widget/color-icc-selector.cpp.ORIG	2019-01-15 05:29:27.000000000 +0100
+++ b/src/ui/widget/color-icc-selector.cpp	2019-02-01 12:31:47.770306444 +0100
@@ -673,7 +673,7 @@
 
 #if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
 struct _cmp {
-  bool operator()(const SPObject * const & a, const SPObject * const & b)
+  bool operator()(const SPObject * const & a, const SPObject * const & b) const
   {
     const Inkscape::ColorProfile &a_prof = reinterpret_cast<const Inkscape::ColorProfile &>(*a);
     const Inkscape::ColorProfile &b_prof = reinterpret_cast<const Inkscape::ColorProfile &>(*b);