diff --git a/src/events/signal_emitter.cpp b/src/events/signal_emitter.cpp index c45d7ec1..0a87b8d7 100644 --- a/src/events/signal_emitter.cpp +++ b/src/events/signal_emitter.cpp @@ -8,8 +8,7 @@ signal_receivers_t g_signal_receivers; * Create instance */ signal_emitter::make_type signal_emitter::make() { - auto instance = factory_util::singleton(); - return static_cast(*instance); + return static_cast(*factory_util::singleton()); } POLYBAR_NS_END diff --git a/src/x11/connection.cpp b/src/x11/connection.cpp index 349fa42c..7d50bedf 100644 --- a/src/x11/connection.cpp +++ b/src/x11/connection.cpp @@ -12,8 +12,8 @@ POLYBAR_NS * Create instance */ connection::make_type connection::make() { - auto instance = factory_util::singleton(xutils::get_connection(), xutils::get_connection_fd()); - return static_cast(*instance); + return static_cast( + *factory_util::singleton(xutils::get_connection(), xutils::get_connection_fd())); } /** diff --git a/src/x11/xresources.cpp b/src/x11/xresources.cpp index 865d8a9c..c79e8e17 100644 --- a/src/x11/xresources.cpp +++ b/src/x11/xresources.cpp @@ -12,8 +12,7 @@ POLYBAR_NS * Create instance */ const xresource_manager& xresource_manager::make() { - auto instance = factory_util::singleton(); - return static_cast(*instance); + return static_cast(*factory_util::singleton()); } /**