#47729: unit_type_iterate() to call unit_type_array_last() just once Open Date: 2023-04-01 08:02 Last Update: 2023-06-03 11:03 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/47729 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=47729 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2023-06-03 11:03 Updated by: cazfi * Owner Update from (None) to cazfi * Resolution Update from None to Accepted --------------------------------------------------------------------- Ticket Status: Reporter: cazfi Owner: cazfi Type: Patches Status: Open [Owner assigned] Priority: 5 - Medium MileStone: 3.0.8 Component: General Severity: 5 - Medium Resolution: Accepted --------------------------------------------------------------------- Ticket details: Number of unit types in the ruleset is not going to change during their iteration, so unit_type_iterate() should get that number just once, instead of calling unit_type_array_last() on every round (to avoid function call overhead) -- Ticket information of Freeciv project Freeciv Project is hosted on OSDN Project URL: https://osdn.net/projects/freeciv/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/freeciv/ticket/47729 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=47729