From f3253d0f1432eb290f2753c187121f874b106a8e Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 2 Dec 2018 14:06:39 -0500 Subject: [PATCH] yuzu/configuration/configure_input: Default destructor in the cpp file The previous code could potentially be a compilation issue waiting to occur, given we forward declare the type for a std::unique_ptr. If the complete definition of the forward declared type isn't visible in a translation unit that the class is used in, then it would fail to compile. Defaulting the destructor in a cpp file ensures the std::unique_ptr's destructor is only invoked where its complete type is known. --- src/yuzu/configuration/configure_input.cpp | 2 ++ src/yuzu/configuration/configure_input.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/yuzu/configuration/configure_input.cpp b/src/yuzu/configuration/configure_input.cpp index 0527d098c3..830d261153 100644 --- a/src/yuzu/configuration/configure_input.cpp +++ b/src/yuzu/configuration/configure_input.cpp @@ -88,6 +88,8 @@ ConfigureInput::ConfigureInput(QWidget* parent) [this] { CallConfigureDialog(*this); }); } +ConfigureInput::~ConfigureInput() = default; + void ConfigureInput::OnDockedModeChanged(bool last_state, bool new_state) { if (ui->use_docked_mode->isChecked() && ui->handheld_connected->isChecked()) { ui->handheld_connected->setChecked(false); diff --git a/src/yuzu/configuration/configure_input.h b/src/yuzu/configuration/configure_input.h index e8723dfcb8..1649e4c0b0 100644 --- a/src/yuzu/configuration/configure_input.h +++ b/src/yuzu/configuration/configure_input.h @@ -25,6 +25,7 @@ class ConfigureInput : public QWidget { public: explicit ConfigureInput(QWidget* parent = nullptr); + ~ConfigureInput() override; /// Save all button configurations to settings file void applyConfiguration();