aboutsummaryrefslogtreecommitdiff
path: root/third_party/agg23/0013-cxx20.patch
blob: 1a77349a3650d6ae30114bb90bfc90bf5f73c6e3 (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
diff --git a/third_party/agg23/agg_basics.h b/third_party/agg23/agg_basics.h
index e7583e308..84313db5b 100644
--- a/third_party/agg23/agg_basics.h
+++ b/third_party/agg23/agg_basics.h
@@ -216,7 +216,7 @@ inline bool is_close(unsigned c)
 {
     c &= ~path_flags_jr;
     return (c & ~(path_flags_cw | path_flags_ccw)) ==
-           (path_cmd_end_poly | path_flags_close);
+           (unsigned{path_cmd_end_poly} | path_flags_close);
 }
 inline bool is_next_poly(unsigned c)
 {
diff --git a/third_party/agg23/agg_path_storage.cpp b/third_party/agg23/agg_path_storage.cpp
index 1491e9e33..2981e9c0c 100644
--- a/third_party/agg23/agg_path_storage.cpp
+++ b/third_party/agg23/agg_path_storage.cpp
@@ -98,7 +98,7 @@ void path_storage::end_poly()
 {
     if(m_total_vertices) {
         if(is_vertex(command(m_total_vertices - 1))) {
-            add_vertex(0, 0, path_cmd_end_poly | path_flags_close);
+            add_vertex(0, 0, unsigned{path_cmd_end_poly} | path_flags_close);
         }
     }
 }
diff --git a/third_party/agg23/agg_rasterizer_scanline_aa.h b/third_party/agg23/agg_rasterizer_scanline_aa.h
index 133d66c4f..dd0d00076 100644
--- a/third_party/agg23/agg_rasterizer_scanline_aa.h
+++ b/third_party/agg23/agg_rasterizer_scanline_aa.h
@@ -49,7 +49,7 @@ enum poly_base_scale_e {
 };
 inline int poly_coord(float c)
 {
-    return int(c * poly_base_size);
+    return int(c * float{poly_base_size});
 }
 struct cell_aa  {
     int x;
diff --git a/third_party/agg23/agg_vcgen_stroke.cpp b/third_party/agg23/agg_vcgen_stroke.cpp
index f65eac55f..b0f8a50e2 100644
--- a/third_party/agg23/agg_vcgen_stroke.cpp
+++ b/third_party/agg23/agg_vcgen_stroke.cpp
@@ -202,10 +202,10 @@ unsigned vcgen_stroke::vertex(float* x, float* y)
                 break;
             case end_poly1:
                 m_status = m_prev_status;
-                return path_cmd_end_poly | path_flags_close | path_flags_ccw;
+                return unsigned{path_cmd_end_poly} | path_flags_close | path_flags_ccw;
             case end_poly2:
                 m_status = m_prev_status;
-                return path_cmd_end_poly | path_flags_close | path_flags_cw;
+                return unsigned{path_cmd_end_poly} | path_flags_close | path_flags_cw;
             case stop:
                 cmd = path_cmd_stop;
                 break;