summaryrefslogtreecommitdiff
path: root/include/dbus_singleton.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/dbus_singleton.hpp')
-rw-r--r--include/dbus_singleton.hpp33
1 files changed, 20 insertions, 13 deletions
diff --git a/include/dbus_singleton.hpp b/include/dbus_singleton.hpp
index a4a16bb2d1..2438152b3f 100644
--- a/include/dbus_singleton.hpp
+++ b/include/dbus_singleton.hpp
@@ -1,21 +1,28 @@
#pragma once
-#include <sdbusplus/asio/connection.hpp>
#include <iostream>
+#include <sdbusplus/asio/connection.hpp>
-namespace mapbox {
+namespace mapbox
+{
template <typename T, typename... Types>
-const T* getPtr(const mapbox::util::variant<Types...>& v) {
- if (v.template is<std::remove_const_t<T>>()) {
- return &v.template get_unchecked<std::remove_const_t<T>>();
- } else {
- return nullptr;
- }
+const T* getPtr(const mapbox::util::variant<Types...>& v)
+{
+ if (v.template is<std::remove_const_t<T>>())
+ {
+ return &v.template get_unchecked<std::remove_const_t<T>>();
+ }
+ else
+ {
+ return nullptr;
+ }
}
-} // namespace mapbox
+} // namespace mapbox
-namespace crow {
-namespace connections {
+namespace crow
+{
+namespace connections
+{
static std::shared_ptr<sdbusplus::asio::connection> systemBus;
-} // namespace connections
-} // namespace crow
+} // namespace connections
+} // namespace crow