From 532e25be125ff72e2474939e76e5c97a0405ce06 Mon Sep 17 00:00:00 2001 From: Sintendo <3380580+Sintendo@users.noreply.github.com> Date: Sun, 5 Jan 2025 12:22:12 +0100 Subject: [PATCH] Fix several minor warnings --- Source/Core/DolphinQt/Config/ConfigControls/ConfigChoice.cpp | 4 ++-- Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.cpp | 4 ++-- Source/UnitTests/Common/FileUtilTest.cpp | 2 +- Source/UnitTests/Core/IOS/ES/FormatsTest.cpp | 2 +- Source/UnitTests/Core/IOS/FS/FileSystemTest.cpp | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/Core/DolphinQt/Config/ConfigControls/ConfigChoice.cpp b/Source/Core/DolphinQt/Config/ConfigControls/ConfigChoice.cpp index b1c12a4172..254896f22e 100644 --- a/Source/Core/DolphinQt/Config/ConfigControls/ConfigChoice.cpp +++ b/Source/Core/DolphinQt/Config/ConfigControls/ConfigChoice.cpp @@ -74,7 +74,7 @@ void ConfigStringChoice::OnConfigChanged() ConfigComplexChoice::ConfigComplexChoice(const InfoVariant setting1, const InfoVariant setting2, Config::Layer* layer) - : m_setting1(setting1), m_setting2(setting2), m_layer(layer) + : m_layer(layer), m_setting1(setting1), m_setting2(setting2) { connect(&Settings::Instance(), &Settings::ConfigChanged, this, &ConfigComplexChoice::Refresh); connect(this, &QComboBox::currentIndexChanged, this, &ConfigComplexChoice::SaveValue); @@ -115,7 +115,7 @@ void ConfigComplexChoice::Reset() void ConfigComplexChoice::SaveValue(int choice) { - auto Set = [this, choice](auto& setting, auto& value) { + auto Set = [this](auto& setting, auto& value) { if (m_layer != nullptr) { m_layer->Set(setting.GetLocation(), value); diff --git a/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.cpp b/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.cpp index 5471a1bcb5..a3d6ae7c57 100644 --- a/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.cpp +++ b/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.cpp @@ -36,7 +36,7 @@ AdvancedWidget::AdvancedWidget(GraphicsWindow* parent) OnEmulationStateChanged(state != Core::State::Uninitialized); }); connect(m_manual_texture_sampling, &QCheckBox::toggled, - [this, parent] { emit parent->UseFastTextureSamplingChanged(); }); + [parent] { emit parent->UseFastTextureSamplingChanged(); }); OnBackendChanged(); OnEmulationStateChanged(!Core::IsUninitialized(Core::System::GetInstance())); @@ -262,7 +262,7 @@ void AdvancedWidget::ConnectWidgets() m_dump_base_textures->setEnabled(checked); }); connect(m_enable_graphics_mods, &QCheckBox::toggled, this, - [this](bool checked) { emit Settings::Instance().EnableGfxModsChanged(checked); }); + [](bool checked) { emit Settings::Instance().EnableGfxModsChanged(checked); }); #if defined(HAVE_FFMPEG) connect(m_dump_use_lossless, &QCheckBox::toggled, this, [this](bool checked) { m_dump_bitrate->setEnabled(!checked); }); diff --git a/Source/UnitTests/Common/FileUtilTest.cpp b/Source/UnitTests/Common/FileUtilTest.cpp index d361f656f3..6b3f1168d2 100644 --- a/Source/UnitTests/Common/FileUtilTest.cpp +++ b/Source/UnitTests/Common/FileUtilTest.cpp @@ -24,7 +24,7 @@ protected: } } - void SetUp() + void SetUp() override { if (m_parent_directory.empty()) { diff --git a/Source/UnitTests/Core/IOS/ES/FormatsTest.cpp b/Source/UnitTests/Core/IOS/ES/FormatsTest.cpp index 60227ef51b..c2082ffbc8 100644 --- a/Source/UnitTests/Core/IOS/ES/FormatsTest.cpp +++ b/Source/UnitTests/Core/IOS/ES/FormatsTest.cpp @@ -44,7 +44,7 @@ TEST(TMDReader, Validity) class TMDReaderTest : public ::testing::Test { protected: - virtual void SetUp() = 0; + void SetUp() override = 0; // Common tests. void TestGeneralInfo(); diff --git a/Source/UnitTests/Core/IOS/FS/FileSystemTest.cpp b/Source/UnitTests/Core/IOS/FS/FileSystemTest.cpp index 513f86d4c9..5c84982b2a 100644 --- a/Source/UnitTests/Core/IOS/FS/FileSystemTest.cpp +++ b/Source/UnitTests/Core/IOS/FS/FileSystemTest.cpp @@ -41,7 +41,7 @@ protected: m_fs.reset(); File::DeleteDirRecursively(m_profile_path); } - void SetUp() + void SetUp() override { if (UserDirectoryCreationFailed()) {