diff --git a/src/EventManager/EventListener.hpp b/src/EventManager/EventListener.hpp index 9e6304fd..a8c9a7dc 100644 --- a/src/EventManager/EventListener.hpp +++ b/src/EventManager/EventListener.hpp @@ -143,7 +143,7 @@ namespace Bloom void registerCallbackForEventType(std::function callback) { // We encapsulate the callback in a lambda to handle the downcasting. std::function parentCallback = - [callback] (const Events::Event& event) { + [callback](const Events::Event& event) { // Downcast the event to the expected type callback(dynamic_cast(event)); } diff --git a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp index 5021b001..1a280334 100644 --- a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp @@ -159,11 +159,11 @@ void InsightWindow::activate() { * considered a duplicate. */ auto processedVariants = std::vector(); - auto isDuplicateVariant = [&processedVariants] (const TargetVariant& variantA) { + auto isDuplicateVariant = [&processedVariants](const TargetVariant& variantA) { return std::ranges::any_of( processedVariants.begin(), processedVariants.end(), - [&variantA, &processedVariants] (const TargetVariant& variantB) { + [&variantA, &processedVariants](const TargetVariant& variantB) { if (variantA.package != variantB.package) { return false; } diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.cpp index d22fb18e..47cc477c 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.cpp @@ -313,7 +313,7 @@ void TargetRegisterInspectorWindow::refreshRegisterValue() { readTargetRegisterTask, &ReadTargetRegisters::targetRegistersRead, this, - [this] (Targets::TargetRegisters targetRegisters) { + [this](Targets::TargetRegisters targetRegisters) { this->registerValueContainer->setDisabled(false); for (const auto& targetRegister : targetRegisters) { @@ -351,7 +351,7 @@ void TargetRegisterInspectorWindow::applyChanges() { this->registerHistoryWidget->selectCurrentItem(); }); - this->connect(writeRegisterTask, &InsightWorkerTask::failed, this, [this] (QString errorMessage) { + this->connect(writeRegisterTask, &InsightWorkerTask::failed, this, [this](QString errorMessage) { this->registerValueContainer->setDisabled(false); auto errorDialogue = new ErrorDialogue( "Error", diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterWidget.cpp index 9b604109..03d595f6 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterWidget.cpp @@ -127,7 +127,7 @@ void RegisterWidget::refreshValue() { readRegisterTask, &ReadTargetRegisters::targetRegistersRead, this, - [this] (Targets::TargetRegisters registers) { + [this](Targets::TargetRegisters registers) { for (const auto& targetRegister : registers) { if (targetRegister.descriptor == this->descriptor) { this->setRegisterValue(targetRegister); diff --git a/src/Targets/Microchip/AVR/AVR8/TargetDescription/TargetDescriptionFile.cpp b/src/Targets/Microchip/AVR/AVR8/TargetDescription/TargetDescriptionFile.cpp index d991aa78..e1aa9851 100644 --- a/src/Targets/Microchip/AVR/AVR8/TargetDescription/TargetDescriptionFile.cpp +++ b/src/Targets/Microchip/AVR/AVR8/TargetDescription/TargetDescriptionFile.cpp @@ -36,7 +36,7 @@ TargetDescriptionFile::TargetDescriptionFile( descriptionFilesJsonArray.begin(), descriptionFilesJsonArray.end(), std::back_inserter(matchingDescriptionFiles), - [&targetName] (const QJsonValue& value) { + [&targetName](const QJsonValue& value) { auto pdTargetName = value.toObject().find("targetName")->toString().toLower().toStdString(); return !targetName.has_value() || (targetName.has_value() && targetName.value() == pdTargetName); } @@ -66,7 +66,7 @@ TargetDescriptionFile::TargetDescriptionFile( matchingDescriptionFiles.begin(), matchingDescriptionFiles.end(), std::back_inserter(targetNames), - [] (const QJsonValue& descriptionFile) { + [](const QJsonValue& descriptionFile) { return QString("\"" + descriptionFile.toObject().find("targetName")->toString().toLower() + "\""); } );