[Freeciv-tickets] [freeciv] #48433: city_total_unit_gold_upkeep() : Duplicate unit_list_size() check

Zurück zum Archiv-Index
OSDN Ticket System norep****@osdn*****
Mon Oct 16 00:38:56 JST 2023


#48433: city_total_unit_gold_upkeep() : Duplicate unit_list_size() check

  Open Date: 2023-07-21 21:25
Last Update: 2023-10-15 18:38

URL for this Ticket:
    https://osdn.net//projects/freeciv/ticket/48433
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=48433

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2023-10-15 18:38 Updated by: cazfi
 * Status Update from Open to Closed
 * Resolution Update from Accepted to Fixed


---------------------------------------------------------------------
Ticket Status:

      Reporter: cazfi
         Owner: cazfi
          Type: Patches
        Status: Closed
      Priority: 5 - Medium
     MileStone: 3.1.0-beta4
     Component: General
      Severity: 5 - Medium
    Resolution: Fixed
---------------------------------------------------------------------

Ticket details:

city_total_unit_gold_upkeep() checks if unit_list_size() is at least one, before iterating the list. That's redundant check, as iteration over zero item list would do nothing. Simplify the code by removing the check.

-- 
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/48433
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=48433



More information about the Freeciv-tickets mailing list
Zurück zum Archiv-Index