diff --git a/src/btcsignals.h b/src/btcsignals.h index e0df8ae8adb..b990fb9d8ea 100644 --- a/src/btcsignals.h +++ b/src/btcsignals.h @@ -122,7 +122,7 @@ class scoped_connection connection m_conn; public: - scoped_connection(connection rhs) noexcept : m_conn{std::move(rhs)} {} + explicit scoped_connection(connection rhs) noexcept : m_conn{std::move(rhs)} {} scoped_connection(scoped_connection&&) noexcept = default; diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index bf42f78da04..47790eb3abd 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -485,9 +485,9 @@ int GuiMain(int argc, char* argv[]) util::ThreadSetInternalName("main"); // Subscribe to global signals from core - btcsignals::scoped_connection handler_message_box = ::uiInterface.ThreadSafeMessageBox_connect(noui_ThreadSafeMessageBox); - btcsignals::scoped_connection handler_question = ::uiInterface.ThreadSafeQuestion_connect(noui_ThreadSafeQuestion); - btcsignals::scoped_connection handler_init_message = ::uiInterface.InitMessage_connect(noui_InitMessage); + btcsignals::scoped_connection handler_message_box{::uiInterface.ThreadSafeMessageBox_connect(noui_ThreadSafeMessageBox)}; + btcsignals::scoped_connection handler_question{::uiInterface.ThreadSafeQuestion_connect(noui_ThreadSafeQuestion)}; + btcsignals::scoped_connection handler_init_message{::uiInterface.InitMessage_connect(noui_InitMessage)}; // Do not refer to data directory yet, this can be overridden by Intro::pickDataDirectory