aboutsummaryrefslogtreecommitdiffstats
path: root/core/dbus_wrap.cpp
diff options
context:
space:
mode:
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) \