From 0fabab07606883fdd2b31b263d54a2a2908aed16 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 29 May 2019 06:16:28 -0400 Subject: VideoCommon/NetPlayGolfUI: Initialize netplay_client in the constructor initializer list --- Source/Core/VideoCommon/NetPlayGolfUI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon/NetPlayGolfUI.cpp') diff --git a/Source/Core/VideoCommon/NetPlayGolfUI.cpp b/Source/Core/VideoCommon/NetPlayGolfUI.cpp index 3a831b1cf1..42fd1186db 100644 --- a/Source/Core/VideoCommon/NetPlayGolfUI.cpp +++ b/Source/Core/VideoCommon/NetPlayGolfUI.cpp @@ -16,8 +16,8 @@ constexpr float DEFAULT_WINDOW_HEIGHT = 45.0f; std::unique_ptr g_netplay_golf_ui; NetPlayGolfUI::NetPlayGolfUI(std::shared_ptr netplay_client) + : m_netplay_client{netplay_client} { - m_netplay_client = netplay_client; } void NetPlayGolfUI::Display() -- cgit v1.2.3 From cf0f2bbf1d6703d2c568e36636b4a467f6787214 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 29 May 2019 06:17:24 -0400 Subject: VideoCommon/NetPlayGolfUI: Default the destructor in the cpp file Ensures the destruction logic is kept local to the translation unit. It also doesn't really do much to have it specified in the header. --- Source/Core/VideoCommon/NetPlayGolfUI.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Source/Core/VideoCommon/NetPlayGolfUI.cpp') diff --git a/Source/Core/VideoCommon/NetPlayGolfUI.cpp b/Source/Core/VideoCommon/NetPlayGolfUI.cpp index 42fd1186db..fe67f9a63f 100644 --- a/Source/Core/VideoCommon/NetPlayGolfUI.cpp +++ b/Source/Core/VideoCommon/NetPlayGolfUI.cpp @@ -20,6 +20,8 @@ NetPlayGolfUI::NetPlayGolfUI(std::shared_ptr netplay_cli { } +NetPlayGolfUI::~NetPlayGolfUI() = default; + void NetPlayGolfUI::Display() { auto client = m_netplay_client.lock(); -- cgit v1.2.3