build: simplify dict loops

Instead of iterating on the keys and then using get(), iterate on
both keys and values.

Signed-off-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
Simon Ser 2023-07-03 17:06:57 +02:00
parent e1abed62d5
commit 78e38c57bf

View file

@ -57,16 +57,16 @@ foreach name : stable_protocols
protocol_files += ['stable/@0@/@0@.xml'.format(name)] protocol_files += ['stable/@0@/@0@.xml'.format(name)]
endforeach endforeach
foreach name : staging_protocols.keys() foreach name, versions : staging_protocols
foreach version : staging_protocols.get(name) foreach version : versions
protocol_files += [ protocol_files += [
'staging/@0@/@0@-@1@.xml'.format(name, version) 'staging/@0@/@0@-@1@.xml'.format(name, version)
] ]
endforeach endforeach
endforeach endforeach
foreach name : unstable_protocols.keys() foreach name, versions : unstable_protocols
foreach version : unstable_protocols.get(name) foreach version : versions
protocol_files += [ protocol_files += [
'unstable/@0@/@0@-unstable-@1@.xml'.format(name, version) 'unstable/@0@/@0@-unstable-@1@.xml'.format(name, version)
] ]