aboutsummaryrefslogtreecommitdiffstats
path: root/core/dbus_wrap.cpp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-11-28 12:51:46 +0100
committerSven Gothel <[email protected]>2023-11-28 12:51:46 +0100
commit1aaf4f070011490bcece50394b9b32dfa593fd9e (patch)
tree17d68284e401a35eea3d3a574d986d446a60763a /core/dbus_wrap.cpp
parent6e7cee4fa9a8af03f28ca26cd89f8357390dfc90 (diff)
parent571b546f35eead77ce109f8d4dd6c3de3199d573 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'core/dbus_wrap.cpp')
-rw-r--r--core/dbus_wrap.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/core/dbus_wrap.cpp b/core/dbus_wrap.cpp
index 7f221706..48419566 100644
--- a/core/dbus_wrap.cpp
+++ b/core/dbus_wrap.cpp
@@ -8,20 +8,16 @@
#include <mutex>
#include <type_traits>
+#include "albit.h"
#include "logging.h"
-void *dbus_handle{nullptr};
-#define DECL_FUNC(x) decltype(p##x) p##x{};
-DBUS_FUNCTIONS(DECL_FUNC)
-#undef DECL_FUNC
-
void PrepareDBus()
{
static constexpr char libname[] = "libdbus-1.so.3";
auto load_func = [](auto &f, const char *name) -> void
- { f = reinterpret_cast<std::remove_reference_t<decltype(f)>>(GetSymbol(dbus_handle, name)); };
+ { f = al::bit_cast<std::remove_reference_t<decltype(f)>>(GetSymbol(dbus_handle, name)); };
#define LOAD_FUNC(x) do { \
load_func(p##x, #x); \
if(!p##x) \