comparison src/sys/glib/dark_theme.cc @ 411:02a670a8e1c4

*: fix build fails
author Paper <paper@tflc.us>
date Sat, 25 Jul 2026 14:22:44 -0400
parents df4a027623d0
children
comparison
equal deleted inserted replaced
410:eb554255ea5f 411:02a670a8e1c4
1 #include "sys/glib/dark_theme.h" 1 #include "sys/glib/dark_theme.h"
2 #include "core/strings.h" 2 #include "core/strings.h"
3 3
4 #include <array> 4 #include <array>
5 #include <cstring> 5 #include <cstring>
6 #include <gio/gio.h>
7 #include <memory> 6 #include <memory>
8 #include <string_view> 7 #include <string_view>
8
9 #ifdef __GNUC__
10 /* Shut up */
11 # pragma GCC diagnostic push
12 # pragma GCC diagnostic ignored "-Wold-style-cast"
13 #endif
14 #include <gio/gio.h>
15 #ifdef __GNUC__
16 # pragma GCC diagnostic pop
17 #endif
9 18
10 namespace glib { 19 namespace glib {
11 20
12 /* deleters */ 21 /* deleters */
13 template<typename T> 22 template<typename T>
20 void operator()(T *p) const { ::g_variant_unref(p); }; 29 void operator()(T *p) const { ::g_variant_unref(p); };
21 }; 30 };
22 31
23 template<typename T> 32 template<typename T>
24 struct g_malloc_del { 33 struct g_malloc_del {
25 void operator()(T *p) const { ::g_free(p); }; 34 void operator()(T *p) const { (::g_free)(p); };
26 }; 35 };
27 36
28 template<typename T> 37 template<typename T>
29 using GObjectPtr = std::unique_ptr<T, g_object_del<T>>; 38 using GObjectPtr = std::unique_ptr<T, g_object_del<T>>;
30 39