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

Back to archive index
OSDN Ticket System norep****@osdn*****
Tue Oct 10 07:02:55 JST 2023


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

  Open Date: 2023-07-21 21:25
Last Update: 2023-10-10 01:02

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-10 01:02 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.1.0-beta4
     Component: General
      Severity: 5 - Medium
    Resolution: Accepted
---------------------------------------------------------------------

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