mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-19 08:11:19 +00:00
wmlunits: Avoid an unneeded list swap
[ci skip]
This commit is contained in:
parent
a62ee3930e
commit
3fec145351
@ -631,9 +631,9 @@ class HTMLOutput:
|
||||
racename = T(u.race, "plural_name")
|
||||
else:
|
||||
racename = "none"
|
||||
runits = races.get(racename, [])
|
||||
runits.append(uid)
|
||||
races[racename] = runits
|
||||
if not racename in races:
|
||||
races[racename] = []
|
||||
races[racename].append(uid)
|
||||
|
||||
racelist = sorted(races.keys())
|
||||
for r in racelist:
|
||||
|
Loading…
x
Reference in New Issue
Block a user