Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
style: less ifs
  • Loading branch information
Luca Bianconi committed Jan 30, 2023
commit e07272f04d324e1759a6997207fc43396a56767e
7 changes: 2 additions & 5 deletions 7 arduino/cores/fqbn.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,15 @@ func (fqbn *FQBN) Match(target *FQBN) bool {
if fqbn.StringWithoutConfig() != target.StringWithoutConfig() {
return false
}

searchedProperties := target.Configs.Clone()
actualConfigs := fqbn.Configs.AsMap()
for neededKey, neededValue := range searchedProperties.AsMap() {
targetValue, hasKey := actualConfigs[neededKey]
if !hasKey {
return false
}
if targetValue != neededValue {
if !hasKey || targetValue != neededValue {
return false
}
}

return true
}

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.