summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorDr. Dystopia <jonis9898@hotmail.com>2025-04-28 22:02:56 +0200
committerDr. Dystopia <jonis9898@hotmail.com>2025-06-14 10:19:31 +0200
commitca8f9b672b3d8da3e2974802e89f6c6b6e23d99e (patch)
treeb6dd8deb5f1bf6d110d71a73521a241d37c577b1 /Source
parent95f6c76713e6c2a6b50f1a149a7886e72fea6ec7 (diff)
Source: Remove redundant lambda parameter lists
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Common/Assembler/GekkoIRGen.cpp9
-rw-r--r--Source/Core/Core/AchievementManager.cpp6
-rw-r--r--Source/Core/Core/Core.cpp7
-rw-r--r--Source/Core/Core/FifoPlayer/FifoDataFile.cpp2
-rw-r--r--Source/Core/Core/HW/EXI/EXI_DeviceIPL.cpp2
-rw-r--r--Source/Core/Core/IOS/Network/KD/VFF/VFFUtil.cpp6
-rw-r--r--Source/Core/Core/IOS/USB/OH0/OH0.cpp2
-rw-r--r--Source/Core/Core/IOS/USB/USB_HID/HIDv4.cpp2
-rw-r--r--Source/Core/Core/IOS/USB/USB_HID/HIDv5.cpp2
-rw-r--r--Source/Core/Core/IOS/USB/USB_VEN/VEN.cpp2
-rw-r--r--Source/Core/Core/NetPlayClient.cpp2
-rw-r--r--Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreter_Disassembler.cpp2
-rw-r--r--Source/Core/Core/State.cpp2
-rw-r--r--Source/Core/Core/WiiUtils.cpp4
-rw-r--r--Source/Core/DiscIO/VolumeWii.cpp2
-rw-r--r--Source/Core/DiscIO/WIABlob.cpp2
-rw-r--r--Source/Core/DolphinQt/Config/ConfigControls/ConfigInteger.cpp2
-rw-r--r--Source/Core/DolphinQt/Config/ConfigControls/ConfigSlider.cpp2
-rw-r--r--Source/Core/DolphinQt/Config/GameConfigWidget.cpp2
-rw-r--r--Source/Core/DolphinQt/Config/Graphics/EnhancementsWidget.cpp4
-rw-r--r--Source/Core/DolphinQt/Config/Mapping/IOWindow.cpp2
-rw-r--r--Source/Core/DolphinQt/Config/Mapping/MappingIndicator.cpp10
-rw-r--r--Source/Core/DolphinQt/Config/Mapping/MappingWidget.cpp4
-rw-r--r--Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp6
-rw-r--r--Source/Core/DolphinQt/Debugger/CodeWidget.cpp4
-rw-r--r--Source/Core/DolphinQt/Debugger/JitBlockTableModel.cpp2
-rw-r--r--Source/Core/DolphinQt/Debugger/RegisterWidget.cpp2
-rw-r--r--Source/Core/DolphinQt/GBAWidget.cpp10
-rw-r--r--Source/Core/DolphinQt/GameList/GameList.cpp2
-rw-r--r--Source/Core/DolphinQt/HotkeyScheduler.cpp6
-rw-r--r--Source/Core/DolphinQt/InfinityBase/InfinityBaseWindow.cpp2
-rw-r--r--Source/Core/DolphinQt/MainWindow.cpp8
-rw-r--r--Source/Core/DolphinQt/MenuBar.cpp20
-rw-r--r--Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp2
-rw-r--r--Source/Core/DolphinQt/RiivolutionBootWidget.cpp2
-rw-r--r--Source/Core/DolphinQt/Settings/GeneralPane.cpp2
-rw-r--r--Source/Core/DolphinQt/Settings/WiiPane.cpp4
-rw-r--r--Source/Core/DolphinQt/SkylanderPortal/SkylanderModifyDialog.cpp4
-rw-r--r--Source/Core/DolphinQt/SkylanderPortal/SkylanderPortalWindow.cpp4
-rw-r--r--Source/Core/InputCommon/ControlReference/ExpressionParser.cpp2
-rw-r--r--Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp2
-rw-r--r--Source/Core/UICommon/UICommon.cpp2
-rw-r--r--Source/Core/VideoBackends/Vulkan/CommandBufferManager.cpp13
-rw-r--r--Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomPipeline.cpp4
-rw-r--r--Source/Core/VideoCommon/PerformanceMetrics.cpp2
-rw-r--r--Source/Core/VideoCommon/Spirv.cpp2
-rw-r--r--Source/Core/VideoCommon/Statistics.cpp4
-rw-r--r--Source/Core/VideoCommon/VertexLoaderX64.cpp2
-rw-r--r--Source/Core/VideoCommon/VideoConfig.cpp2
-rw-r--r--Source/UnitTests/Common/BlockingLoopTest.cpp8
-rw-r--r--Source/UnitTests/Common/BusyLoopTest.cpp2
-rw-r--r--Source/UnitTests/Common/EventTest.cpp4
-rw-r--r--Source/UnitTests/Common/FlagTest.cpp6
-rw-r--r--Source/UnitTests/Common/SPSCQueueTest.cpp4
54 files changed, 108 insertions, 111 deletions
diff --git a/Source/Core/Common/Assembler/GekkoIRGen.cpp b/Source/Core/Common/Assembler/GekkoIRGen.cpp
index 7ca8edbf94..7ec7c476ba 100644
--- a/Source/Core/Common/Assembler/GekkoIRGen.cpp
+++ b/Source/Core/Common/Assembler/GekkoIRGen.cpp
@@ -504,16 +504,15 @@ void GekkoIRPlugin::AddBinaryEvaluator(u32 (*evaluator)(u32, u32))
m_fixup_stack.pop();
std::function<u32()> lhs = std::move(m_fixup_stack.top());
m_fixup_stack.pop();
- m_fixup_stack.emplace([evaluator, lhs = std::move(lhs), rhs = std::move(rhs)]() {
- return evaluator(lhs(), rhs());
- });
+ m_fixup_stack.emplace(
+ [evaluator, lhs = std::move(lhs), rhs = std::move(rhs)] { return evaluator(lhs(), rhs()); });
}
void GekkoIRPlugin::AddUnaryEvaluator(u32 (*evaluator)(u32))
{
std::function<u32()> sub = std::move(m_fixup_stack.top());
m_fixup_stack.pop();
- m_fixup_stack.emplace([evaluator, sub = std::move(sub)]() { return evaluator(sub()); });
+ m_fixup_stack.emplace([evaluator, sub = std::move(sub)] { return evaluator(sub()); });
}
void GekkoIRPlugin::AddAbsoluteAddressConv()
@@ -579,7 +578,7 @@ void GekkoIRPlugin::AddNumLabelSymResolve(std::string_view sym, u32 num)
// Searching forward only
size_t search_start_idx = static_cast<size_t>(m_numlabs.size());
m_fixup_stack.emplace(
- [this, num, source_address, search_start_idx, err_on_fail = std::move(err_on_fail)]() {
+ [this, num, source_address, search_start_idx, err_on_fail = std::move(err_on_fail)] {
for (size_t i = search_start_idx; i < m_numlabs.size(); i++)
{
if (num == m_numlabs[i].first)
diff --git a/Source/Core/Core/AchievementManager.cpp b/Source/Core/Core/AchievementManager.cpp
index ca3b6135ca..0ed5628c43 100644
--- a/Source/Core/Core/AchievementManager.cpp
+++ b/Source/Core/Core/AchievementManager.cpp
@@ -380,7 +380,7 @@ bool AchievementManager::CanPause()
void AchievementManager::DoIdle()
{
- std::thread([this]() {
+ std::thread([this] {
while (true)
{
Common::SleepCurrentThread(1000);
@@ -959,7 +959,7 @@ void AchievementManager::LeaderboardEntriesCallback(int result, const char* erro
rc_client_t* client, void* userdata)
{
u32* leaderboard_id = static_cast<u32*>(userdata);
- Common::ScopeGuard on_end_scope([&]() { delete leaderboard_id; });
+ Common::ScopeGuard on_end_scope([&] { delete leaderboard_id; });
if (result != RC_OK)
{
@@ -1372,7 +1372,7 @@ void AchievementManager::FetchBadge(AchievementManager::Badge* badge, u32 badge_
m_image_queue.Push([this, badge, badge_type, function = std::move(function),
callback_data = std::move(callback_data)] {
- Common::ScopeGuard on_end_scope([&]() {
+ Common::ScopeGuard on_end_scope([&] {
if (m_display_welcome_message && badge_type == RC_IMAGE_TYPE_GAME)
DisplayWelcomeMessage();
});
diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp
index e02be0d1ed..a122a467e9 100644
--- a/Source/Core/Core/Core.cpp
+++ b/Source/Core/Core/Core.cpp
@@ -506,14 +506,13 @@ static void EmuThread(Core::System& system, std::unique_ptr<BootParameters> boot
Config::Get(Config::MAIN_WII_SD_CARD_ENABLE_FOLDER_SYNC);
if (sync_sd_folder)
{
- sync_sd_folder =
- Common::SyncSDFolderToSDImage([]() { return false; }, Core::WantsDeterminism());
+ sync_sd_folder = Common::SyncSDFolderToSDImage([] { return false; }, Core::WantsDeterminism());
}
Common::ScopeGuard sd_folder_sync_guard{[sync_sd_folder] {
if (sync_sd_folder && Config::Get(Config::MAIN_ALLOW_SD_WRITES))
{
- const bool sync_ok = Common::SyncSDImageToSDFolder([]() { return false; });
+ const bool sync_ok = Common::SyncSDImageToSDFolder([] { return false; });
if (!sync_ok)
{
PanicAlertFmtT(
@@ -829,7 +828,7 @@ void RunOnCPUThread(Core::System& system, Common::MoveOnlyFunction<void()> funct
{
// Trigger the event after executing the function.
s_cpu_thread_job_finished.Reset();
- system.GetCPU().AddCPUThreadJob([&function]() {
+ system.GetCPU().AddCPUThreadJob([&function] {
function();
s_cpu_thread_job_finished.Set();
});
diff --git a/Source/Core/Core/FifoPlayer/FifoDataFile.cpp b/Source/Core/Core/FifoPlayer/FifoDataFile.cpp
index 0bc85ba516..f48b555f7e 100644
--- a/Source/Core/Core/FifoPlayer/FifoDataFile.cpp
+++ b/Source/Core/Core/FifoPlayer/FifoDataFile.cpp
@@ -209,7 +209,7 @@ std::unique_ptr<FifoDataFile> FifoDataFile::Load(const std::string& filename, bo
if (!file)
return nullptr;
- auto panic_failed_to_read = []() {
+ auto panic_failed_to_read = [] {
CriticalAlertFmtT("Failed to read DFF file.");
return nullptr;
};
diff --git a/Source/Core/Core/HW/EXI/EXI_DeviceIPL.cpp b/Source/Core/Core/HW/EXI/EXI_DeviceIPL.cpp
index 2a761cfcdd..dcce161410 100644
--- a/Source/Core/Core/HW/EXI/EXI_DeviceIPL.cpp
+++ b/Source/Core/Core/HW/EXI/EXI_DeviceIPL.cpp
@@ -296,7 +296,7 @@ void CEXIIPL::TransferByte(u8& data)
DEBUG_LOG_FMT(EXPANSIONINTERFACE, "IPL-DEV data {} {:08x} {:02x}",
m_command.is_write() ? "write" : "read", address, data);
- auto UartFifoAccess = [&]() {
+ auto UartFifoAccess = [&] {
if (m_command.is_write())
{
if (data != '\0')
diff --git a/Source/Core/Core/IOS/Network/KD/VFF/VFFUtil.cpp b/Source/Core/Core/IOS/Network/KD/VFF/VFFUtil.cpp
index b2f0ebb1bb..c7ddffbc15 100644
--- a/Source/Core/Core/IOS/Network/KD/VFF/VFFUtil.cpp
+++ b/Source/Core/Core/IOS/Network/KD/VFF/VFFUtil.cpp
@@ -305,7 +305,7 @@ ErrorCode WriteToVFF(const std::string& path, const std::string& filename,
{
VffFatFsCallbacks callbacks;
ErrorCode return_value;
- Common::RunInFatFsContext(callbacks, [&]() {
+ Common::RunInFatFsContext(callbacks, [&] {
auto temp = fs->OpenFile(PID_KD, PID_KD, path, FS::Mode::ReadWrite);
if (!temp)
{
@@ -360,7 +360,7 @@ ErrorCode ReadFromVFF(const std::string& path, const std::string& filename,
{
VffFatFsCallbacks callbacks;
ErrorCode return_value;
- Common::RunInFatFsContext(callbacks, [&]() {
+ Common::RunInFatFsContext(callbacks, [&] {
auto temp = fs->OpenFile(PID_KD, PID_KD, path, FS::Mode::ReadWrite);
if (!temp)
{
@@ -411,7 +411,7 @@ ErrorCode DeleteFileFromVFF(const std::string& path, const std::string& filename
{
VffFatFsCallbacks callbacks;
ErrorCode return_value;
- Common::RunInFatFsContext(callbacks, [&]() {
+ Common::RunInFatFsContext(callbacks, [&] {
auto temp = fs->OpenFile(PID_KD, PID_KD, path, FS::Mode::ReadWrite);
if (!temp)
{
diff --git a/Source/Core/Core/IOS/USB/OH0/OH0.cpp b/Source/Core/Core/IOS/USB/OH0/OH0.cpp
index 4f5df4cf10..37d5202448 100644
--- a/Source/Core/Core/IOS/USB/OH0/OH0.cpp
+++ b/Source/Core/Core/IOS/USB/OH0/OH0.cpp
@@ -335,7 +335,7 @@ std::optional<IPCReply> OH0::DeviceIOCtlV(const u64 device_id, const IOCtlVReque
case USB::IOCTLV_USBV0_INTRMSG:
case USB::IOCTLV_USBV0_ISOMSG:
return HandleTransfer(device, request.request,
- [&, this]() { return SubmitTransfer(*device, request); });
+ [&, this] { return SubmitTransfer(*device, request); });
case USB::IOCTLV_USBV0_UNKNOWN_32:
request.DumpUnknown(GetSystem(), GetDeviceName(), Common::Log::LogType::IOS_USB);
return IPCReply(IPC_SUCCESS);
diff --git a/Source/Core/Core/IOS/USB/USB_HID/HIDv4.cpp b/Source/Core/Core/IOS/USB/USB_HID/HIDv4.cpp
index 46f22cd0ce..aa70c0f523 100644
--- a/Source/Core/Core/IOS/USB/USB_HID/HIDv4.cpp
+++ b/Source/Core/Core/IOS/USB/USB_HID/HIDv4.cpp
@@ -61,7 +61,7 @@ std::optional<IPCReply> USB_HIDv4::IOCtl(const IOCtlRequest& request)
if (!device->Attach())
return IPCReply(IPC_EINVAL);
return HandleTransfer(device, request.request,
- [&, this]() { return SubmitTransfer(*device, request); });
+ [&, this] { return SubmitTransfer(*device, request); });
}
default:
request.DumpUnknown(GetSystem(), GetDeviceName(), Common::Log::LogType::IOS_USB);
diff --git a/Source/Core/Core/IOS/USB/USB_HID/HIDv5.cpp b/Source/Core/Core/IOS/USB/USB_HID/HIDv5.cpp
index e193c498f5..ac4439d438 100644
--- a/Source/Core/Core/IOS/USB/USB_HID/HIDv5.cpp
+++ b/Source/Core/Core/IOS/USB/USB_HID/HIDv5.cpp
@@ -75,7 +75,7 @@ std::optional<IPCReply> USB_HIDv5::IOCtlV(const IOCtlVRequest& request)
else
host_device->AttachAndChangeInterface(device->interface_number);
return HandleTransfer(host_device, request.request,
- [&, this]() { return SubmitTransfer(*device, *host_device, request); });
+ [&, this] { return SubmitTransfer(*device, *host_device, request); });
}
default:
request.DumpUnknown(GetSystem(), GetDeviceName(), Common::Log::LogType::IOS_USB);
diff --git a/Source/Core/Core/IOS/USB/USB_VEN/VEN.cpp b/Source/Core/Core/IOS/USB/USB_VEN/VEN.cpp
index d8d624e898..2217453840 100644
--- a/Source/Core/Core/IOS/USB/USB_VEN/VEN.cpp
+++ b/Source/Core/Core/IOS/USB/USB_VEN/VEN.cpp
@@ -85,7 +85,7 @@ std::optional<IPCReply> USB_VEN::IOCtlV(const IOCtlVRequest& request)
else
host_device->AttachAndChangeInterface(device->interface_number);
return HandleTransfer(host_device, request.request,
- [&, this]() { return SubmitTransfer(*host_device, request); });
+ [&, this] { return SubmitTransfer(*host_device, request); });
}
default:
return IPCReply(IPC_EINVAL);
diff --git a/Source/Core/Core/NetPlayClient.cpp b/Source/Core/Core/NetPlayClient.cpp
index d3568ae2d1..ee784ce771 100644
--- a/Source/Core/Core/NetPlayClient.cpp
+++ b/Source/Core/Core/NetPlayClient.cpp
@@ -2596,7 +2596,7 @@ void NetPlayClient::ComputeGameDigest(const SyncIdentifier& sync_identifier)
if (m_game_digest_thread.joinable())
m_game_digest_thread.join();
- m_game_digest_thread = std::thread([this, file]() {
+ m_game_digest_thread = std::thread([this, file] {
std::string sum = SHA1Sum(file, [&](int progress) {
sf::Packet packet;
packet << MessageID::GameDigestProgress;
diff --git a/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreter_Disassembler.cpp b/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreter_Disassembler.cpp
index 725d124958..bc62f9204c 100644
--- a/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreter_Disassembler.cpp
+++ b/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreter_Disassembler.cpp
@@ -119,7 +119,7 @@ std::size_t CachedInterpreter::Disassemble(const JitBlock& block, std::ostream&
#undef LOOKUP_KV
- std::call_once(s_sorted_lookup_flag, []() {
+ std::call_once(s_sorted_lookup_flag, [] {
const auto end = std::ranges::sort(sorted_lookup, {}, &LookupKV::first);
ASSERT_MSG(DYNA_REC, std::ranges::adjacent_find(sorted_lookup, {}, &LookupKV::first) == end,
"Sorted lookup should not contain duplicate keys.");
diff --git a/Source/Core/Core/State.cpp b/Source/Core/Core/State.cpp
index f508fd202d..49ff84dd30 100644
--- a/Source/Core/Core/State.cpp
+++ b/Source/Core/Core/State.cpp
@@ -765,7 +765,7 @@ static void LoadFileStateData(const std::string& filename, Common::UniqueBuffer<
if (s_state_writes_in_queue != 0)
{
if (!s_state_write_queue_is_empty.wait_for(lk, std::chrono::seconds(3),
- []() { return s_state_writes_in_queue == 0; }))
+ [] { return s_state_writes_in_queue == 0; }))
{
Core::DisplayMessage(
"A previous state saving operation is still in progress, cancelling load.", 2000);
diff --git a/Source/Core/Core/WiiUtils.cpp b/Source/Core/Core/WiiUtils.cpp
index 0bbf8dc8c8..3dc6aa9f43 100644
--- a/Source/Core/Core/WiiUtils.cpp
+++ b/Source/Core/Core/WiiUtils.cpp
@@ -85,7 +85,7 @@ static bool ImportWAD(IOS::HLE::Kernel& ios, const DiscIO::VolumeWAD& wad,
return false;
}
- const bool contents_imported = [&]() {
+ const bool contents_imported = [&] {
const u64 title_id = tmd.GetTitleId();
for (const IOS::ES::Content& content : tmd.GetContents())
{
@@ -584,7 +584,7 @@ UpdateResult OnlineSystemUpdater::InstallTitleFromNUS(const std::string& prefix_
// Now download and install contents listed in the TMD.
const std::vector<IOS::ES::Content> stored_contents = es.GetStoredContentsFromTMD(tmd.first);
- const UpdateResult import_result = [&]() {
+ const UpdateResult import_result = [&] {
for (const IOS::ES::Content& content : tmd.first.GetContents())
{
const bool is_already_installed =
diff --git a/Source/Core/DiscIO/VolumeWii.cpp b/Source/Core/DiscIO/VolumeWii.cpp
index 764dabe543..3ba8433788 100644
--- a/Source/Core/DiscIO/VolumeWii.cpp
+++ b/Source/Core/DiscIO/VolumeWii.cpp
@@ -518,7 +518,7 @@ bool VolumeWii::HashGroup(const std::array<u8, BLOCK_DATA_SIZE> in[BLOCKS_PER_GR
if (read_function && success)
success = read_function(i);
- hash_futures[i] = std::async(std::launch::async, [&in, &out, &hash_futures, success, i]() {
+ hash_futures[i] = std::async(std::launch::async, [&in, &out, &hash_futures, success, i] {
const size_t h1_base = Common::AlignDown(i, 8);
if (success)
diff --git a/Source/Core/DiscIO/WIABlob.cpp b/Source/Core/DiscIO/WIABlob.cpp
index 9ee8470294..18cdb04d4b 100644
--- a/Source/Core/DiscIO/WIABlob.cpp
+++ b/Source/Core/DiscIO/WIABlob.cpp
@@ -1569,7 +1569,7 @@ WIARVZFileReader<RVZ>::ProcessAndCompress(CompressThreadState* state, CompressPa
continue;
}
- const auto pad_exception_lists = [&entry]() {
+ const auto pad_exception_lists = [&entry] {
while (entry.exception_lists.size() % 4 != 0)
entry.exception_lists.push_back(0);
};
diff --git a/Source/Core/DolphinQt/Config/ConfigControls/ConfigInteger.cpp b/Source/Core/DolphinQt/Config/ConfigControls/ConfigInteger.cpp
index a81bfd7aed..5246de60f5 100644
--- a/Source/Core/DolphinQt/Config/ConfigControls/ConfigInteger.cpp
+++ b/Source/Core/DolphinQt/Config/ConfigControls/ConfigInteger.cpp
@@ -33,7 +33,7 @@ void ConfigInteger::OnConfigChanged()
ConfigIntegerLabel::ConfigIntegerLabel(const QString& text, ConfigInteger* widget)
: QLabel(text), m_widget(QPointer<ConfigInteger>(widget))
{
- connect(&Settings::Instance(), &Settings::ConfigChanged, this, [this]() {
+ connect(&Settings::Instance(), &Settings::ConfigChanged, this, [this] {
// Label shares font changes with ConfigInteger to mark game ini settings.
if (m_widget)
setFont(m_widget->font());
diff --git a/Source/Core/DolphinQt/Config/ConfigControls/ConfigSlider.cpp b/Source/Core/DolphinQt/Config/ConfigControls/ConfigSlider.cpp
index 3bba97a4a5..42632061f3 100644
--- a/Source/Core/DolphinQt/Config/ConfigControls/ConfigSlider.cpp
+++ b/Source/Core/DolphinQt/Config/ConfigControls/ConfigSlider.cpp
@@ -113,7 +113,7 @@ void ConfigSliderU32::OnConfigChanged()
ConfigSliderLabel::ConfigSliderLabel(const QString& text, ConfigSlider* slider)
: QLabel(text), m_slider(QPointer<ConfigSlider>(slider))
{
- connect(&Settings::Instance(), &Settings::ConfigChanged, this, [this]() {
+ connect(&Settings::Instance(), &Settings::ConfigChanged, this, [this] {
// Label shares font changes with slider to mark game ini settings.
if (m_slider)
setFont(m_slider->font());
diff --git a/Source/Core/DolphinQt/Config/GameConfigWidget.cpp b/Source/Core/DolphinQt/Config/GameConfigWidget.cpp
index 4505605de0..bdddc1b879 100644
--- a/Source/Core/DolphinQt/Config/GameConfigWidget.cpp
+++ b/Source/Core/DolphinQt/Config/GameConfigWidget.cpp
@@ -88,7 +88,7 @@ GameConfigWidget::GameConfigWidget(const UICommon::GameFile& game) : m_game(game
}
// Fails to change font if it's directly called at this time. Is there a better workaround?
- QTimer::singleShot(100, this, [this]() {
+ QTimer::singleShot(100, this, [this] {
SetItalics();
Config::OnConfigChanged();
});
diff --git a/Source/Core/DolphinQt/Config/Graphics/EnhancementsWidget.cpp b/Source/Core/DolphinQt/Config/Graphics/EnhancementsWidget.cpp
index eb5f473bae..7d89d9238a 100644
--- a/Source/Core/DolphinQt/Config/Graphics/EnhancementsWidget.cpp
+++ b/Source/Core/DolphinQt/Config/Graphics/EnhancementsWidget.cpp
@@ -41,10 +41,10 @@ EnhancementsWidget::EnhancementsWidget(GraphicsWindow* parent)
// BackendChanged is called by parent on window creation.
connect(parent, &GraphicsWindow::BackendChanged, this, &EnhancementsWidget::OnBackendChanged);
- connect(parent, &GraphicsWindow::UseFastTextureSamplingChanged, this, [this]() {
+ connect(parent, &GraphicsWindow::UseFastTextureSamplingChanged, this, [this] {
m_texture_filtering_combo->setEnabled(ReadSetting(Config::GFX_HACK_FAST_TEXTURE_SAMPLING));
});
- connect(parent, &GraphicsWindow::UseGPUTextureDecodingChanged, this, [this]() {
+ connect(parent, &GraphicsWindow::UseGPUTextureDecodingChanged, this, [this] {
m_arbitrary_mipmap_detection->setEnabled(!ReadSetting(Config::GFX_ENABLE_GPU_TEXTURE_DECODING));
});
}
diff --git a/Source/Core/DolphinQt/Config/Mapping/IOWindow.cpp b/Source/Core/DolphinQt/Config/Mapping/IOWindow.cpp
index 7b282adaa4..82af157df5 100644
--- a/Source/Core/DolphinQt/Config/Mapping/IOWindow.cpp
+++ b/Source/Core/DolphinQt/Config/Mapping/IOWindow.cpp
@@ -113,7 +113,7 @@ QTextCharFormat GetCommentCharFormat()
ControlExpressionSyntaxHighlighter::ControlExpressionSyntaxHighlighter(QTextDocument* parent)
: QObject(parent)
{
- connect(parent, &QTextDocument::contentsChanged, this, [this, parent]() { Highlight(parent); });
+ connect(parent, &QTextDocument::contentsChanged, this, [this, parent] { Highlight(parent); });
}
void QComboBoxWithMouseWheelDisabled::wheelEvent(QWheelEvent* event)
diff --git a/Source/Core/DolphinQt/Config/Mapping/MappingIndicator.cpp b/Source/Core/DolphinQt/Config/Mapping/MappingIndicator.cpp
index f2b2383a18..802290b12c 100644
--- a/Source/Core/DolphinQt/Config/Mapping/MappingIndicator.cpp
+++ b/Source/Core/DolphinQt/Config/Mapping/MappingIndicator.cpp
@@ -990,15 +990,15 @@ void CalibrationWidget::SetupActions()
const auto center_action = new QAction(tr("Center and Calibrate"), this);
const auto reset_action = new QAction(tr("Reset"), this);
- connect(calibrate_action, &QAction::triggered, [this]() {
+ connect(calibrate_action, &QAction::triggered, [this] {
StartCalibration();
m_new_center = Common::DVec2{};
});
- connect(center_action, &QAction::triggered, [this]() {
+ connect(center_action, &QAction::triggered, [this] {
StartCalibration();
m_new_center = std::nullopt;
});
- connect(reset_action, &QAction::triggered, [this]() {
+ connect(reset_action, &QAction::triggered, [this] {
m_input.SetCalibrationToDefault();
m_input.SetCenter({0, 0});
});
@@ -1012,7 +1012,7 @@ void CalibrationWidget::SetupActions()
setDefaultAction(calibrate_action);
m_completion_action = new QAction(tr("Finish Calibration"), this);
- connect(m_completion_action, &QAction::triggered, [this]() {
+ connect(m_completion_action, &QAction::triggered, [this] {
m_input.SetCenter(GetCenter());
m_input.SetCalibrationData(std::move(m_calibration_data));
m_informative_timer->stop();
@@ -1027,7 +1027,7 @@ void CalibrationWidget::StartCalibration()
// Cancel calibration.
const auto cancel_action = new QAction(tr("Cancel Calibration"), this);
- connect(cancel_action, &QAction::triggered, [this]() {
+ connect(cancel_action, &QAction::triggered, [this] {
m_calibration_data.clear();
m_informative_timer->stop();
SetupActions();
diff --git a/Source/Core/DolphinQt/Config/Mapping/MappingWidget.cpp b/Source/Core/DolphinQt/Config/Mapping/MappingWidget.cpp
index 061be00684..4331a0f535 100644
--- a/Source/Core/DolphinQt/Config/Mapping/MappingWidget.cpp
+++ b/Source/Core/DolphinQt/Config/Mapping/MappingWidget.cpp
@@ -343,7 +343,7 @@ void MappingWidget::CreateControl(const ControllerEmu::Control* control, QFormLa
if (m_previous_mapping_button)
{
connect(m_previous_mapping_button, &MappingButton::QueueNextButtonMapping,
- [this, button]() { m_parent->QueueInputDetection(button); });
+ [this, button] { m_parent->QueueInputDetection(button); });
}
m_previous_mapping_button = button;
}
@@ -383,7 +383,7 @@ MappingWidget::CreateSettingAdvancedMappingButton(ControllerEmu::NumericSettingB
const auto button = new QPushButton(tr("..."));
button->setFixedWidth(QFontMetrics(font()).boundingRect(button->text()).width() * 2);
- button->connect(button, &QPushButton::clicked, [this, &setting]() {
+ button->connect(button, &QPushButton::clicked, [this, &setting] {
if (setting.IsSimpleValue())
setting.SetExpressionFromValue();
diff --git a/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp b/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp
index dacf78494d..3aeda0efe7 100644
--- a/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp
+++ b/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp
@@ -127,7 +127,7 @@ BreakpointWidget::BreakpointWidget(QWidget* parent)
setHidden(!enabled || !Settings::Instance().IsBreakpointsVisible());
});
- connect(&Settings::Instance(), &Settings::ThemeChanged, this, [this]() {
+ connect(&Settings::Instance(), &Settings::ThemeChanged, this, [this] {
UpdateIcons();
Update();
});
@@ -525,7 +525,7 @@ void BreakpointWidget::OnContextMenu(const QPoint& pos)
menu->addAction(tr("Show in Code"), [this, bp_address] { emit ShowCode(bp_address); });
menu->addAction(tr("Edit..."), [this, bp_address] { OnEditBreakpoint(bp_address, true); });
- menu->addAction(tr("Delete"), [this, &bp_address]() {
+ menu->addAction(tr("Delete"), [this, &bp_address] {
m_system.GetPowerPC().GetBreakPoints().Remove(bp_address);
emit Host::GetInstance()->PPCBreakpointsChanged();
});
@@ -538,7 +538,7 @@ void BreakpointWidget::OnContextMenu(const QPoint& pos)
menu->addAction(tr("Show in Memory"), [this, bp_address] { emit ShowMemory(bp_address); });
menu->addAction(tr("Edit..."), [this, bp_address] { OnEditBreakpoint(bp_address, false); });
- menu->addAction(tr("Delete"), [this, &bp_address]() {
+ menu->addAction(tr("Delete"), [this, &bp_address] {
const QSignalBlocker blocker(Settings::Instance());
m_system.GetPowerPC().GetMemChecks().Remove(bp_address);
emit Host::GetInstance()->PPCBreakpointsChanged();
diff --git a/Source/Core/DolphinQt/Debugger/CodeWidget.cpp b/Source/Core/DolphinQt/Debugger/CodeWidget.cpp
index af6113a811..50f7172a15 100644
--- a/Source/Core/DolphinQt/Debugger/CodeWidget.cpp
+++ b/Source/Core/DolphinQt/Debugger/CodeWidget.cpp
@@ -186,11 +186,11 @@ void CodeWidget::ConnectWidgets()
connect(m_search_address, &QLineEdit::textChanged, this, &CodeWidget::OnSearchAddress);
connect(m_search_address, &QLineEdit::returnPressed, this, &CodeWidget::OnSearchAddress);
connect(m_search_symbols, &QLineEdit::textChanged, this, &CodeWidget::OnSearchSymbols);
- connect(m_search_calls, &QLineEdit::textChanged, this, [this]() {
+ connect(m_search_calls, &QLineEdit::textChanged, this, [this] {
if (const Common::Symbol* symbol = m_ppc_symbol_db.GetSymbolFromAddr(m_code_view->GetAddress()))
UpdateFunctionCalls(symbol);
});
- connect(m_search_callers, &QLineEdit::textChanged, this, [this]() {
+ connect(m_search_callers, &QLineEdit::textChanged, this, [this] {
if (const Common::Symbol* symbol = m_ppc_symbol_db.GetSymbolFromAddr(m_code_view->GetAddress()))
UpdateFunctionCallers(symbol);
});
diff --git a/Source/Core/DolphinQt/Debugger/JitBlockTableModel.cpp b/Source/Core/DolphinQt/Debugger/JitBlockTableModel.cpp
index b9a003779f..3911b6c311 100644
--- a/Source/Core/DolphinQt/Debugger/JitBlockTableModel.cpp
+++ b/Source/Core/DolphinQt/Debugger/JitBlockTableModel.cpp
@@ -56,7 +56,7 @@ void JitBlockTableModel::PrefetchSymbols()
{
for (const JitBlock& block : m_jit_blocks)
{
- m_symbol_list.emplace_back([this, &block]() {
+ m_symbol_list.emplace_back([this, &block] {
return GetSymbolNameQVariant(m_ppc_symbol_db.GetSymbolFromAddr(block.effectiveAddress));
});
}
diff --git a/Source/Core/DolphinQt/Debugger/RegisterWidget.cpp b/Source/Core/DolphinQt/Debugger/RegisterWidget.cpp
index eb6f23d543..01ff696d83 100644
--- a/Source/Core/DolphinQt/Debugger/RegisterWidget.cpp
+++ b/Source/Core/DolphinQt/Debugger/RegisterWidget.cpp
@@ -176,7 +176,7 @@ void RegisterWidget::ShowContextMenu()
const std::string type_string =
fmt::format("{}{}", type == RegisterType::gpr ? "r" : "f", m_table->currentItem()->row());
menu->addAction(tr("Run until hit (ignoring breakpoints)"),
- [this, type_string]() { AutoStep(type_string); });
+ [this, type_string] { AutoStep(type_string); });
}
for (auto* action : {view_hex, view_int, view_uint, view_float, view_double})
diff --git a/Source/Core/DolphinQt/GBAWidget.cpp b/Source/Core/DolphinQt/GBAWidget.cpp
index 86d9130052..794dd40d0a 100644
--- a/Source/Core/DolphinQt/GBAWidget.cpp
+++ b/Source/Core/DolphinQt/GBAWidget.cpp
@@ -37,7 +37,7 @@ static void RestartCore(const std::weak_ptr<HW::GBA::Core>& core, std::string_vi
{
Core::RunOnCPUThread(
Core::System::GetInstance(),
- [core, rom_path = std::string(rom_path)]() {
+ [core, rom_path = std::string(rom_path)] {
if (auto core_ptr = core.lock())
{
auto& info = Config::MAIN_GBA_ROM_PATHS[core_ptr->GetCoreInfo().device_number];
@@ -58,7 +58,7 @@ static void QueueEReaderCard(const std::weak_ptr<HW::GBA::Core>& core, std::stri
{
Core::RunOnCPUThread(
Core::System::GetInstance(),
- [core, card_path = std::string(card_path)]() {
+ [core, card_path = std::string(card_path)] {
if (auto core_ptr = core.lock())
core_ptr->EReaderQueueCard(card_path);
},
@@ -161,7 +161,7 @@ void GBAWidget::ToggleDisconnect()
Core::RunOnCPUThread(
Core::System::GetInstance(),
- [core = m_core, force_disconnect = m_force_disconnect]() {
+ [core = m_core, force_disconnect = m_force_disconnect] {
if (auto core_ptr = core.lock())
core_ptr->SetForceDisconnect(force_disconnect);
},
@@ -224,7 +224,7 @@ void GBAWidget::DoState(bool export_state)
Core::RunOnCPUThread(
Core::System::GetInstance(),
- [export_state, core = m_core, state_path = state_path.toStdString()]() {
+ [export_state, core = m_core, state_path = state_path.toStdString()] {
if (auto core_ptr = core.lock())
{
if (export_state)
@@ -255,7 +255,7 @@ void GBAWidget::ImportExportSave(bool export_save)
Core::RunOnCPUThread(
Core::System::GetInstance(),
- [export_save, core = m_core, save_path = save_path.toStdString()]() {
+ [export_save, core = m_core, save_path = save_path.toStdString()] {
if (auto core_ptr = core.lock())
{
if (export_save)
diff --git a/Source/Core/DolphinQt/GameList/GameList.cpp b/Source/Core/DolphinQt/GameList/GameList.cpp
index 41a2fe44e4..b2392e2f2e 100644
--- a/Source/Core/DolphinQt/GameList/GameList.cpp
+++ b/Source/Core/DolphinQt/GameList/GameList.cpp
@@ -580,7 +580,7 @@ void GameList::OpenProperties()
connect(properties, &PropertiesDialog::OpenGraphicsSettings, this,
&GameList::OpenGraphicsSettings);
connect(properties, &PropertiesDialog::finished, this,
- [properties]() { properties->deleteLater(); });
+ [properties] { properties->deleteLater(); });
#ifdef USE_RETRO_ACHIEVEMENTS
connect(properties, &PropertiesDialog::OpenAchievementSettings, this,
diff --git a/Source/Core/DolphinQt/HotkeyScheduler.cpp b/Source/Core/DolphinQt/HotkeyScheduler.cpp
index 0432958ea2..ead6a40c66 100644
--- a/Source/Core/DolphinQt/HotkeyScheduler.cpp
+++ b/Source/Core/DolphinQt/HotkeyScheduler.cpp
@@ -345,7 +345,7 @@ void HotkeyScheduler::Run()
else if (IsHotkey(HK_NEXT_GAME_WIIMOTE_PROFILE_4))
m_profile_cycler.NextWiimoteProfileForGame(3);
- auto ShowVolume = []() {
+ auto ShowVolume = [] {
OSD::AddMessage(std::string("Volume: ") +
(Config::Get(Config::MAIN_AUDIO_MUTED) ?
"Muted" :
@@ -450,7 +450,7 @@ void HotkeyScheduler::Run()
OSD::AddMessage(fmt::format("Copy EFB: {}", new_value ? "to Texture" : "to RAM"));
}
- auto ShowXFBCopies = []() {
+ auto ShowXFBCopies = [] {
OSD::AddMessage(fmt::format(
"Copy XFB: {}{}", Config::Get(Config::GFX_HACK_IMMEDIATE_XFB) ? " (Immediate)" : "",
Config::Get(Config::GFX_HACK_SKIP_XFB_COPY_TO_RAM) ? "to Texture" : "to RAM"));
@@ -504,7 +504,7 @@ void HotkeyScheduler::Run()
AudioCommon::UpdateSoundStream(system);
}
- auto ShowEmulationSpeed = []() {
+ auto ShowEmulationSpeed = [] {
const float emulation_speed = Config::Get(Config::MAIN_EMULATION_SPEED);
if (!AchievementManager::GetInstance().IsHardcoreModeActive() ||
Config::Get(Config::MAIN_EMULATION_SPEED) >= 1.0f ||
diff --git a/Source/Core/DolphinQt/InfinityBase/InfinityBaseWindow.cpp b/Source/Core/DolphinQt/InfinityBase/InfinityBaseWindow.cpp
index d9616f1fab..7867704223 100644
--- a/Source/Core/DolphinQt/InfinityBase/InfinityBaseWindow.cpp
+++ b/Source/Core/DolphinQt/InfinityBase/InfinityBaseWindow.cpp
@@ -266,7 +266,7 @@ CreateFigureDialog::CreateFigureDialog(QWidget* parent, FigureUIPosition slot) :
}
});
- connect(buttons, &QDialogButtonBox::accepted, this, [=, this]() {
+ connect(buttons, &QDialogButtonBox::accepted, this, [=, this] {
bool ok_char = false;
const u32 char_number = edit_num->text().toULong(&ok_char);
if (!ok_char)
diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp
index d15ddef425..c26c6a3f6f 100644
--- a/Source/Core/DolphinQt/MainWindow.cpp
+++ b/Source/Core/DolphinQt/MainWindow.cpp
@@ -277,7 +277,7 @@ MainWindow::MainWindow(Core::System& system, std::unique_ptr<BootParameters> boo
Settings::Instance().SetDebugModeEnabled(false);
// This needs to trigger on both RA_HARDCORE_ENABLED and RA_ENABLED
m_config_changed_callback_id = Config::AddConfigChangedCallback(
- [this]() { QueueOnObject(this, [this] { this->OnHardcoreChanged(); }); });
+ [this] { QueueOnObject(this, [this] { this->OnHardcoreChanged(); }); });
// If hardcore is enabled when the emulator starts, make sure it turns off what it needs to
if (Config::Get(Config::RA_HARDCORE_ENABLED))
OnHardcoreChanged();
@@ -540,7 +540,7 @@ void MainWindow::ConnectMenuBar()
// Emulation
connect(m_menu_bar, &MenuBar::Pause, this, &MainWindow::Pause);
- connect(m_menu_bar, &MenuBar::Play, this, [this]() { Play(); });
+ connect(m_menu_bar, &MenuBar::Play, this, [this] { Play(); });
connect(m_menu_bar, &MenuBar::Stop, this, &MainWindow::RequestStop);
connect(m_menu_bar, &MenuBar::Reset, this, &MainWindow::Reset);
connect(m_menu_bar, &MenuBar::Fullscreen, this, &MainWindow::FullScreen);
@@ -697,7 +697,7 @@ void MainWindow::ConnectToolBar()
connect(m_tool_bar, &ToolBar::OpenPressed, this, &MainWindow::Open);
connect(m_tool_bar, &ToolBar::RefreshPressed, this, &MainWindow::RefreshGameList);
- connect(m_tool_bar, &ToolBar::PlayPressed, this, [this]() { Play(); });
+ connect(m_tool_bar, &ToolBar::PlayPressed, this, [this] { Play(); });
connect(m_tool_bar, &ToolBar::PausePressed, this, &MainWindow::Pause);
connect(m_tool_bar, &ToolBar::StopPressed, this, &MainWindow::RequestStop);
connect(m_tool_bar, &ToolBar::FullScreenPressed, this, &MainWindow::FullScreen);
@@ -716,7 +716,7 @@ void MainWindow::ConnectToolBar()
void MainWindow::ConnectGameList()
{
- connect(m_game_list, &GameList::GameSelected, this, [this]() { Play(); });
+ connect(m_game_list, &GameList::GameSelected, this, [this] { Play(); });
connect(m_game_list, &GameList::NetPlayHost, this, &MainWindow::NetPlayHost);
connect(m_game_list, &GameList::OnStartWithRiivolution, this,
&MainWindow::ShowRiivolutionBootWidget);
diff --git a/Source/Core/DolphinQt/MenuBar.cpp b/Source/Core/DolphinQt/MenuBar.cpp
index 948072a67a..2f3245fe62 100644
--- a/Source/Core/DolphinQt/MenuBar.cpp
+++ b/Source/Core/DolphinQt/MenuBar.cpp
@@ -296,7 +296,7 @@ void MenuBar::AddToolsMenu()
#ifdef RC_CLIENT_SUPPORTS_RAINTEGRATION
m_achievements_dev_menu = tools_menu->addMenu(tr("RetroAchievements Development"));
AchievementManager::GetInstance().SetDevMenuUpdateCallback(
- [this]() { QueueOnObject(this, [this] { this->UpdateAchievementDevelopmentMenu(); }); });
+ [this] { QueueOnObject(this, [this] { this->UpdateAchievementDevelopmentMenu(); }); });
m_achievements_dev_menu->menuAction()->setVisible(false);
#endif // RC_CLIENT_SUPPORTS_RAINTEGRATION
tools_menu->addSeparator();
@@ -406,7 +406,7 @@ void MenuBar::AddStateLoadMenu(QMenu* emu_menu)
{
QAction* action = m_state_load_slots_menu->addAction(QString{});
- connect(action, &QAction::triggered, this, [=, this]() { emit StateLoadSlotAt(i); });
+ connect(action, &QAction::triggered, this, [=, this] { emit StateLoadSlotAt(i); });
}
}
@@ -423,7 +423,7 @@ void MenuBar::AddStateSaveMenu(QMenu* emu_menu)
{
QAction* action = m_state_save_slots_menu->addAction(QString{});
- connect(action, &QAction::triggered, this, [=, this]() { emit StateSaveSlotAt(i); });
+ connect(action, &QAction::triggered, this, [=, this] { emit StateSaveSlotAt(i); });
}
}
@@ -440,7 +440,7 @@ void MenuBar::AddStateSlotMenu(QMenu* emu_menu)
if (Settings::Instance().GetStateSlot() == i)
action->setChecked(true);
- connect(action, &QAction::triggered, this, [=, this]() { emit SetStateSlot(i); });
+ connect(action, &QAction::triggered, this, [=, this] { emit SetStateSlot(i); });
connect(this, &MenuBar::SetStateSlot, [action, i](const int slot) {
if (slot == i)
action->setChecked(true);
@@ -629,7 +629,7 @@ void MenuBar::AddOptionsMenu()
m_reset_ignore_panic_handler = options_menu->addAction(tr("Reset Ignore Panic Handler"));
- connect(m_reset_ignore_panic_handler, &QAction::triggered, this, []() {
+ connect(m_reset_ignore_panic_handler, &QAction::triggered, this, [] {
Config::DeleteKey(Config::LayerType::CurrentRun, Config::MAIN_USE_PANIC_HANDLERS);
});
@@ -652,17 +652,17 @@ void MenuBar::AddHelpMenu()
QAction* website = help_menu->addAction(tr("&Website"));
connect(website, &QAction::triggered, this,
- []() { QDesktopServices::openUrl(QUrl(QStringLiteral("https://dolphin-emu.org/"))); });
+ [] { QDesktopServices::openUrl(QUrl(QStringLiteral("https://dolphin-emu.org/"))); });
QAction* documentation = help_menu->addAction(tr("Online &Documentation"));
- connect(documentation, &QAction::triggered, this, []() {
+ connect(documentation, &QAction::triggered, this, [] {
QDesktopServices::openUrl(QUrl(QStringLiteral("https://dolphin-emu.org/docs/guides")));
});
QAction* github = help_menu->addAction(tr("&GitHub Repository"));
- connect(github, &QAction::triggered, this, []() {
+ connect(github, &QAction::triggered, this, [] {
QDesktopServices::openUrl(QUrl(QStringLiteral("https://github.com/dolphin-emu/dolphin")));
});
QAction* bugtracker = help_menu->addAction(tr("&Bug Tracker"));
- connect(bugtracker, &QAction::triggered, this, []() {
+ connect(bugtracker, &QAction::triggered, this, [] {
QDesktopServices::openUrl(
QUrl(QStringLiteral("https://bugs.dolphin-emu.org/projects/emulator")));
});
@@ -1163,7 +1163,7 @@ void MenuBar::UpdateAchievementDevelopmentMenu()
}
auto* ra_dev_menu_item = m_achievements_dev_menu->addAction(
QString::fromStdString(menu_item.label), this,
- [menu_item]() { AchievementManager::GetInstance().ActivateDevMenuItem(menu_item.id); });
+ [menu_item] { AchievementManager::GetInstance().ActivateDevMenuItem(menu_item.id); });
ra_dev_menu_item->setEnabled(menu_item.enabled);
// Recommended hardcode by RAIntegration.dll developer Jamiras
ra_dev_menu_item->setCheckable(i < 2);
diff --git a/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp b/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
index 80179b5dd9..0677666416 100644
--- a/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
+++ b/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
@@ -570,7 +570,7 @@ void NetPlayDialog::UpdateDiscordPresence()
if (m_player_count == 0 || m_current_game_name.empty())
return;
- const auto use_default = [this]() {
+ const auto use_default = [this] {
Discord::UpdateDiscordPresence(m_player_count, Discord::SecretType::Empty, "",
m_current_game_name);
};
diff --git a/Source/Core/DolphinQt/RiivolutionBootWidget.cpp b/Source/Core/DolphinQt/RiivolutionBootWidget.cpp
index 59d8949728..aedb42c903 100644
--- a/Source/Core/DolphinQt/RiivolutionBootWidget.cpp
+++ b/Source/Core/DolphinQt/RiivolutionBootWidget.cpp
@@ -186,7 +186,7 @@ void RiivolutionBootWidget::MakeGUIForParsedFile(std::string path, std::string r
xml_root_layout->addWidget(xml_root_line_edit, 0);
xml_root_layout->addWidget(xml_root_open, 0);
disc_layout->addLayout(xml_root_layout);
- connect(xml_root_open, &QPushButton::clicked, this, [this, xml_root_line_edit, disc_index]() {
+ connect(xml_root_open, &QPushButton::clicked, this, [this, xml_root_line_edit, disc_index] {
QString dir = QDir::toNativeSeparators(QFileDialog::getExistingDirectory(
this, tr("Select the Virtual SD Card Root"), xml_root_line_edit->text()));
if (!dir.isEmpty())
diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.cpp b/Source/Core/DolphinQt/Settings/GeneralPane.cpp
index cff0b10f75..fe6bd90172 100644
--- a/Source/Core/DolphinQt/Settings/GeneralPane.cpp
+++ b/Source/Core/DolphinQt/Settings/GeneralPane.cpp
@@ -114,7 +114,7 @@ void GeneralPane::ConnectLayout()
}
// Advanced
- connect(m_combobox_speedlimit, &QComboBox::currentIndexChanged, [this]() {
+ connect(m_combobox_speedlimit, &QComboBox::currentIndexChanged, [this] {
Config::SetBaseOrCurrent(Config::MAIN_EMULATION_SPEED,
m_combobox_speedlimit->currentIndex() * 0.1f);
Config::Save();
diff --git a/Source/Core/DolphinQt/Settings/WiiPane.cpp b/Source/Core/DolphinQt/Settings/WiiPane.cpp
index 82166e6e45..0ec003c827 100644
--- a/Source/Core/DolphinQt/Settings/WiiPane.cpp
+++ b/Source/Core/DolphinQt/Settings/WiiPane.cpp
@@ -279,7 +279,7 @@ void WiiPane::CreateSDCard()
progress_dialog.GetRaw()->setWindowTitle(tr("Progress"));
auto success = std::async(std::launch::async, [&] {
const bool good = Common::SyncSDFolderToSDImage(
- [&progress_dialog]() { return progress_dialog.WasCanceled(); }, false);
+ [&progress_dialog] { return progress_dialog.WasCanceled(); }, false);
progress_dialog.Reset();
return good;
});
@@ -303,7 +303,7 @@ void WiiPane::CreateSDCard()
progress_dialog.GetRaw()->setWindowTitle(tr("Progress"));
auto success = std::async(std::launch::async, [&] {
const bool good = Common::SyncSDImageToSDFolder(
- [&progress_dialog]() { return progress_dialog.WasCanceled(); });
+ [&progress_dialog] { return progress_dialog.WasCanceled(); });
progress_dialog.Reset();
return good;
});
diff --git a/Source/Core/DolphinQt/SkylanderPortal/SkylanderModifyDialog.cpp b/Source/Core/DolphinQt/SkylanderPortal/SkylanderModifyDialog.cpp
index cd67c257ae..f7f96e39a0 100644
--- a/Source/Core/DolphinQt/SkylanderPortal/SkylanderModifyDialog.cpp
+++ b/Source/Core/DolphinQt/SkylanderPortal/SkylanderModifyDialog.cpp
@@ -210,7 +210,7 @@ void SkylanderModifyDialog::PopulateSkylanderOptions(QVBoxLayout* layout)
layout->addLayout(hbox_last_reset);
layout->addLayout(hbox_last_placed);
- connect(m_buttons, &QDialogButtonBox::accepted, this, [=, this]() {
+ connect(m_buttons, &QDialogButtonBox::accepted, this, [=, this] {
if (!edit_money->hasAcceptableInput())
{
QMessageBox::warning(this, tr("Incorrect money value!"),
@@ -323,7 +323,7 @@ bool SkylanderModifyDialog::PopulateTrophyOptions(QVBoxLayout* layout)
layout->addLayout(hbox);
}
- connect(m_buttons, &QDialogButtonBox::accepted, this, [=, this]() {
+ connect(m_buttons, &QDialogButtonBox::accepted, this, [=, this] {
m_figure_data.trophy_data.unlocked_villains = 0x0;
for (size_t i = 0; i < MAX_VILLAINS; ++i)
m_figure_data.trophy_data.unlocked_villains |=
diff --git a/Source/Core/DolphinQt/SkylanderPortal/SkylanderPortalWindow.cpp b/Source/Core/DolphinQt/SkylanderPortal/SkylanderPortalWindow.cpp
index 3f8adfa114..b87cc70961 100644
--- a/Source/Core/DolphinQt/SkylanderPortal/SkylanderPortalWindow.cpp
+++ b/Source/Core/DolphinQt/SkylanderPortal/SkylanderPortalWindow.cpp
@@ -115,7 +115,7 @@ void SkylanderPortalWindow::CreateMainWindow()
auto* modify_btn = new QPushButton(tr("Modify Slot"));
connect(create_btn, &QAbstractButton::clicked, this,
&SkylanderPortalWindow::CreateSkylanderAdvanced);
- connect(clear_btn, &QAbstractButton::clicked, this, [this]() { ClearSlot(GetCurrentSlot()); });
+ connect(clear_btn, &QAbstractButton::clicked, this, [this] { ClearSlot(GetCurrentSlot()); });
connect(load_btn, &QAbstractButton::clicked, this, &SkylanderPortalWindow::LoadSelected);
connect(load_file_btn, &QAbstractButton::clicked, this, &SkylanderPortalWindow::LoadFromFile);
connect(modify_btn, &QAbstractButton::clicked, this, &SkylanderPortalWindow::ModifySkylander);
@@ -591,7 +591,7 @@ void SkylanderPortalWindow::CreateSkylanderAdvanced()
create_window->setLayout(layout);
- connect(buttons, &QDialogButtonBox::accepted, this, [=, this]() {
+ connect(buttons, &QDialogButtonBox::accepted, this, [=, this] {
bool ok_id = false, ok_var = false;
m_sky_id = edit_id->text().toUShort(&ok_id);
if (!ok_id)
diff --git a/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp b/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp
index df146f425c..8de2b6ef56 100644
--- a/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp
+++ b/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp
@@ -360,7 +360,7 @@ HotkeySuppressions::MakeSuppressor(const Modifiers* modifiers,
}
}
- return Suppressor(std::make_unique<std::function<void()>>([this, modifiers, final_input]() {
+ return Suppressor(std::make_unique<std::function<void()>>([this, modifiers, final_input] {
for (auto& modifier : *modifiers)
RemoveSuppression(modifier->GetInput(), (*final_input)->GetInput());
}).release(),
diff --git a/Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp b/Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp
index 10ebe9a984..9660d9ede8 100644
--- a/Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp
@@ -80,7 +80,7 @@ std::string BuildExpression(const Core::InputDetector::Results& detections,
new_alternation = true;
};
- const auto handle_release = [&]() {
+ const auto handle_release = [&] {
if (!new_alternation)
return;
diff --git a/Source/Core/UICommon/UICommon.cpp b/Source/Core/UICommon/UICommon.cpp
index 309d563864..89912c802c 100644
--- a/Source/Core/UICommon/UICommon.cpp
+++ b/Source/Core/UICommon/UICommon.cpp
@@ -131,7 +131,7 @@ void Init()
Core::RestoreWiiSettings(Core::RestoreReason::CrashRecovery);
Config::Init();
- const auto config_changed_callback = []() {
+ const auto config_changed_callback = [] {
InitCustomPaths();
RefreshConfig();
};
diff --git a/Source/Core/VideoBackends/Vulkan/CommandBufferManager.cpp b/Source/Core/VideoBackends/Vulkan/CommandBufferManager.cpp
index 291f28ce6e..b2f307a910 100644
--- a/Source/Core/VideoBackends/Vulkan/CommandBufferManager.cpp
+++ b/Source/Core/VideoBackends/Vulkan/CommandBufferManager.cpp
@@ -504,36 +504,35 @@ void CommandBufferManager::DeferBufferViewDestruction(VkBufferView object)
{
CmdBufferResources& cmd_buffer_resources = GetCurrentCmdBufferResources();
cmd_buffer_resources.cleanup_resources.push_back(
- [object]() { vkDestroyBufferView(g_vulkan_context->GetDevice(), object, nullptr); });
+ [object] { vkDestroyBufferView(g_vulkan_context->GetDevice(), object, nullptr); });
}
void CommandBufferManager::DeferBufferDestruction(VkBuffer buffer, VmaAllocation alloc)
{
CmdBufferResources& cmd_buffer_resources = GetCurrentCmdBufferResources();
- cmd_buffer_resources.cleanup_resources.push_back([buffer, alloc]() {
- vmaDestroyBuffer(g_vulkan_context->GetMemoryAllocator(), buffer, alloc);
- });
+ cmd_buffer_resources.cleanup_resources.push_back(
+ [buffer, alloc] { vmaDestroyBuffer(g_vulkan_context->GetMemoryAllocator(), buffer, alloc); });
}
void CommandBufferManager::DeferFramebufferDestruction(VkFramebuffer object)
{
CmdBufferResources& cmd_buffer_resources = GetCurrentCmdBufferResources();
cmd_buffer_resources.cleanup_resources.push_back(
- [object]() { vkDestroyFramebuffer(g_vulkan_context->GetDevice(), object, nullptr); });
+ [object] { vkDestroyFramebuffer(g_vulkan_context->GetDevice(), object, nullptr); });
}
void CommandBufferManager::DeferImageDestruction(VkImage image, VmaAllocation alloc)
{
CmdBufferResources& cmd_buffer_resources = GetCurrentCmdBufferResources();
cmd_buffer_resources.cleanup_resources.push_back(
- [image, alloc]() { vmaDestroyImage(g_vulkan_context->GetMemoryAllocator(), image, alloc); });
+ [image, alloc] { vmaDestroyImage(g_vulkan_context->GetMemoryAllocator(), image, alloc); });
}
void CommandBufferManager::DeferImageViewDestruction(VkImageView object)
{
CmdBufferResources& cmd_buffer_resources = GetCurrentCmdBufferResources();
cmd_buffer_resources.cleanup_resources.push_back(
- [object]() { vkDestroyImageView(g_vulkan_context->GetDevice(), object, nullptr); });
+ [object] { vkDestroyImageView(g_vulkan_context->GetDevice(), object, nullptr); });
}
std::unique_ptr<CommandBufferManager> g_command_buffer_mgr;
diff --git a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomPipeline.cpp b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomPipeline.cpp
index f211442e96..d335ed4adb 100644
--- a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomPipeline.cpp
+++ b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomPipeline.cpp
@@ -53,7 +53,7 @@ std::vector<std::string> GlobalConflicts(std::string_view source)
continue;
}
- const auto parse_identifier = [&]() {
+ const auto parse_identifier = [&] {
const u32 start = i;
for (; i < source.size(); i++)
{
@@ -76,7 +76,7 @@ std::vector<std::string> GlobalConflicts(std::string_view source)
}
else if (source[i] == '#')
{
- const auto parse_until_end_of_preprocessor = [&]() {
+ const auto parse_until_end_of_preprocessor = [&] {
bool continue_until_next_newline = false;
for (; i < source.size(); i++)
{
diff --git a/Source/Core/VideoCommon/PerformanceMetrics.cpp b/Source/Core/VideoCommon/PerformanceMetrics.cpp
index 520f9d8b95..0093ed4fcb 100644
--- a/Source/Core/VideoCommon/PerformanceMetrics.cpp
+++ b/Source/Core/VideoCommon/PerformanceMetrics.cpp
@@ -141,7 +141,7 @@ void PerformanceMetrics::DrawImGuiStats(const float backbuffer_scale)
float window_y = window_padding;
float window_x = display_size.x - window_padding;
- const auto clamp_window_position = [&]() {
+ const auto clamp_window_position = [&] {
const ImVec2 position = ImGui::GetWindowPos();
const ImVec2 size = ImGui::GetWindowSize();
const float window_min_x = window_padding;
diff --git a/Source/Core/VideoCommon/Spirv.cpp b/Source/Core/VideoCommon/Spirv.cpp
index 6fee98b536..9583838c97 100644
--- a/Source/Core/VideoCommon/Spirv.cpp
+++ b/Source/Core/VideoCommon/Spirv.cpp
@@ -31,7 +31,7 @@ bool InitializeGlslang()
return false;
}
- std::atexit([]() { glslang::FinalizeProcess(); });
+ std::atexit([] { glslang::FinalizeProcess(); });
glslang_initialized = true;
return true;
diff --git a/Source/Core/VideoCommon/Statistics.cpp b/Source/Core/VideoCommon/Statistics.cpp
index 6326aeed82..6c35ed09fd 100644
--- a/Source/Core/VideoCommon/Statistics.cpp
+++ b/Source/Core/VideoCommon/Statistics.cpp
@@ -323,7 +323,7 @@ void Statistics::DisplayScissor()
}
};
constexpr auto NUM_SCISSOR_COLUMNS = 8;
- const auto draw_scissor_table_header = [&]() {
+ const auto draw_scissor_table_header = [&] {
ImGui::TableSetupColumn("#");
ImGui::TableSetupColumn("x0");
ImGui::TableSetupColumn("y0");
@@ -413,7 +413,7 @@ void Statistics::DisplayScissor()
}
};
constexpr auto NUM_VIEWPORT_COLUMNS = 5;
- const auto draw_viewport_table_header = [&]() {
+ const auto draw_viewport_table_header = [&] {
ImGui::TableSetupColumn("#");
ImGui::TableSetupColumn("vx0");
ImGui::TableSetupColumn("vy0");
diff --git a/Source/Core/VideoCommon/VertexLoaderX64.cpp b/Source/Core/VideoCommon/VertexLoaderX64.cpp
index c7cbf55257..70ea700fdb 100644
--- a/Source/Core/VideoCommon/VertexLoaderX64.cpp
+++ b/Source/Core/VideoCommon/VertexLoaderX64.cpp
@@ -125,7 +125,7 @@ void VertexLoaderX64::ReadVertex(OpArg data, VertexComponentFormat attribute,
X64Reg coords = XMM0;
- const auto write_zfreeze = [&]() { // zfreeze
+ const auto write_zfreeze = [&] { // zfreeze
if (native_format == &m_native_vtx_decl.position)
{
CMP(32, R(remaining_reg), Imm8(3));
diff --git a/Source/Core/VideoCommon/VideoConfig.cpp b/Source/Core/VideoCommon/VideoConfig.cpp
index fb5fb41b05..46f8732c2f 100644
--- a/Source/Core/VideoCommon/VideoConfig.cpp
+++ b/Source/Core/VideoCommon/VideoConfig.cpp
@@ -59,7 +59,7 @@ void VideoConfig::Refresh()
// invalid values. Instead, pause the video thread first, update the config and correct
// it, then resume emulation, after which the video thread will detect the config has
// changed and act accordingly.
- const auto config_changed_callback = []() {
+ const auto config_changed_callback = [] {
auto& system = Core::System::GetInstance();
const bool lock_gpu_thread = Core::IsRunning(system);
diff --git a/Source/UnitTests/Common/BlockingLoopTest.cpp b/Source/UnitTests/Common/BlockingLoopTest.cpp
index 4d8856b94e..85e4aae415 100644
--- a/Source/UnitTests/Common/BlockingLoopTest.cpp
+++ b/Source/UnitTests/Common/BlockingLoopTest.cpp
@@ -24,8 +24,8 @@ TEST(BlockingLoop, MultiThreaded)
// Must not block as the loop is stopped.
loop.Wait();
- std::thread loop_thread([&]() {
- loop.Run([&]() {
+ std::thread loop_thread([&] {
+ loop.Run([&] {
received_a.store(signaled_a.load());
received_b.store(signaled_b.load());
});
@@ -39,7 +39,7 @@ TEST(BlockingLoop, MultiThreaded)
EXPECT_EQ(signaled_a.load(), received_a.load());
EXPECT_EQ(signaled_b.load(), received_b.load());
- std::thread run_a_thread([&]() {
+ std::thread run_a_thread([&] {
for (int j = 0; j < 100; j++)
{
for (int k = 0; k < 100; k++)
@@ -52,7 +52,7 @@ TEST(BlockingLoop, MultiThreaded)
EXPECT_EQ(signaled_a.load(), received_a.load());
}
});
- std::thread run_b_thread([&]() {
+ std::thread run_b_thread([&] {
for (int j = 0; j < 100; j++)
{
for (int k = 0; k < 100; k++)
diff --git a/Source/UnitTests/Common/BusyLoopTest.cpp b/Source/UnitTests/Common/BusyLoopTest.cpp
index 2dc254b8d6..4108876aad 100644
--- a/Source/UnitTests/Common/BusyLoopTest.cpp
+++ b/Source/UnitTests/Common/BusyLoopTest.cpp
@@ -16,7 +16,7 @@ TEST(BusyLoopTest, MultiThreaded)
for (int i = 0; i < 10; i++)
{
loop.Prepare();
- std::thread loop_thread([&]() { loop.Run([&]() { e.Set(); }); });
+ std::thread loop_thread([&] { loop.Run([&] { e.Set(); }); });
// Ping - Pong
for (int j = 0; j < 10; j++)
diff --git a/Source/UnitTests/Common/EventTest.cpp b/Source/UnitTests/Common/EventTest.cpp
index f04fe9f45a..86cf46d62b 100644
--- a/Source/UnitTests/Common/EventTest.cpp
+++ b/Source/UnitTests/Common/EventTest.cpp
@@ -14,7 +14,7 @@ TEST(Event, MultiThreaded)
int shared_obj;
constexpr int ITERATIONS_COUNT = 100000;
- auto sender = [&]() {
+ auto sender = [&] {
for (int i = 0; i < ITERATIONS_COUNT; ++i)
{
can_send.Wait();
@@ -23,7 +23,7 @@ TEST(Event, MultiThreaded)
}
};
- auto receiver = [&]() {
+ auto receiver = [&] {
for (int i = 0; i < ITERATIONS_COUNT; ++i)
{
has_sent.Wait();
diff --git a/Source/UnitTests/Common/FlagTest.cpp b/Source/UnitTests/Common/FlagTest.cpp
index 23aba5f60d..ccd8b00055 100644
--- a/Source/UnitTests/Common/FlagTest.cpp
+++ b/Source/UnitTests/Common/FlagTest.cpp
@@ -36,7 +36,7 @@ TEST(Flag, MultiThreaded)
int count = 0;
constexpr int ITERATIONS_COUNT = 100000;
- auto setter = [&]() {
+ auto setter = [&] {
for (int i = 0; i < ITERATIONS_COUNT; ++i)
{
while (f.IsSet())
@@ -45,7 +45,7 @@ TEST(Flag, MultiThreaded)
}
};
- auto clearer = [&]() {
+ auto clearer = [&] {
for (int i = 0; i < ITERATIONS_COUNT; ++i)
{
while (!f.IsSet())
@@ -72,7 +72,7 @@ TEST(Flag, SpinLock)
constexpr int ITERATIONS_COUNT = 5000;
constexpr int THREADS_COUNT = 50;
- auto adder_func = [&]() {
+ auto adder_func = [&] {
for (int i = 0; i < ITERATIONS_COUNT; ++i)
{
// Acquire the spinlock.
diff --git a/Source/UnitTests/Common/SPSCQueueTest.cpp b/Source/UnitTests/Common/SPSCQueueTest.cpp
index 93b3e584fd..13848bd95f 100644
--- a/Source/UnitTests/Common/SPSCQueueTest.cpp
+++ b/Source/UnitTests/Common/SPSCQueueTest.cpp
@@ -61,7 +61,7 @@ TEST(SPSCQueue, MultiThreaded)
constexpr u32 reps = 100000;
- auto inserter = [&]() {
+ auto inserter = [&] {
for (u32 i = 0; i != reps; ++i)
q.Push({sptr, i});
@@ -71,7 +71,7 @@ TEST(SPSCQueue, MultiThreaded)
EXPECT_EQ(sptr.use_count(), 2);
};
- auto popper = [&]() {
+ auto popper = [&] {
for (u32 i = 0; i != reps; ++i)
{
q.WaitForData();