aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-06-03 22:03:45 -0700
committerChris Robinson <[email protected]>2023-06-03 22:03:45 -0700
commit0b8dea4243c0ebfe0966fccf2870800ab14cec71 (patch)
tree9dcbcc5ef5a065711b87253c24cd298bc84eefc5 /core
parent241a97e4ce0e659e411fb1bd226b80d3e30176ec (diff)
Use inline variables to avoid separate definitions
Diffstat (limited to 'core')
-rw-r--r--core/dbus_wrap.cpp5
-rw-r--r--core/dbus_wrap.h4
2 files changed, 2 insertions, 7 deletions
diff --git a/core/dbus_wrap.cpp b/core/dbus_wrap.cpp
index eaddce9f..48419566 100644
--- a/core/dbus_wrap.cpp
+++ b/core/dbus_wrap.cpp
@@ -12,11 +12,6 @@
#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";
diff --git a/core/dbus_wrap.h b/core/dbus_wrap.h
index 09eaacf9..65f08942 100644
--- a/core/dbus_wrap.h
+++ b/core/dbus_wrap.h
@@ -28,8 +28,8 @@ MAGIC(dbus_message_iter_get_arg_type) \
MAGIC(dbus_message_iter_get_basic) \
MAGIC(dbus_set_error_from_message)
-extern void *dbus_handle;
-#define DECL_FUNC(x) extern decltype(x) *p##x;
+inline void *dbus_handle{};
+#define DECL_FUNC(x) inline decltype(x) *p##x{};
DBUS_FUNCTIONS(DECL_FUNC)
#undef DECL_FUNC