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

Back to archive index
OSDN Ticket System norep****@osdn*****
Wed Aug 30 11:17:17 JST 2023


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

  Open Date: 2023-07-21 21:25
Last Update: 2023-08-30 05:17

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-08-30 05:17 Updated by: cazfi
 * Milestone Update from (None) to 3.1.0-beta4


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

      Reporter: cazfi
         Owner: (None)
          Type: Patches
        Status: Open
      Priority: 5 - Medium
     MileStone: 3.1.0-beta4
     Component: General
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

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
Back to archive index