Tidying lambdas
This commit is contained in:
@@ -134,7 +134,7 @@ TargetDescriptor Avr8Bit::Avr8::getDescriptor() {
|
||||
this->targetVariantsById.begin(),
|
||||
this->targetVariantsById.end(),
|
||||
std::back_inserter(descriptor.variants),
|
||||
[](auto& variantToIdPair) {
|
||||
[] (auto& variantToIdPair) {
|
||||
return variantToIdPair.second;
|
||||
}
|
||||
);
|
||||
@@ -272,7 +272,7 @@ std::map<int, TargetPinState> Avr8::getPinStates(int variantId) {
|
||||
* be considered when the need for it becomes apparent.
|
||||
*/
|
||||
std::map<std::uint16_t, TargetMemoryBuffer> cachedMemoryByStartAddress;
|
||||
auto readMemoryBitset = [this, &cachedMemoryByStartAddress](std::uint16_t startAddress) {
|
||||
auto readMemoryBitset = [this, &cachedMemoryByStartAddress] (std::uint16_t startAddress) {
|
||||
if (!cachedMemoryByStartAddress.contains(startAddress)) {
|
||||
cachedMemoryByStartAddress.insert(
|
||||
std::pair(
|
||||
|
||||
@@ -37,7 +37,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);
|
||||
}
|
||||
@@ -67,7 +67,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() + "\"");
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user