[Freeciv-tickets] [freeciv] #44797: kill_unit() constantly calling player_slot_count()

Back to archive index
OSDN Ticket System norep****@osdn*****
Wed Jun 29 06:25:29 JST 2022


#44797: kill_unit() constantly calling player_slot_count()

  Open Date: 2022-06-11 15:47
Last Update: 2022-06-29 00:25

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

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

Last Changes/Comment on this Ticket:
2022-06-29 00:25 Updated by: cazfi
 * Status Update from Open to Closed
 * Resolution Update from Accepted to Fixed


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

      Reporter: cazfi
         Owner: cazfi
          Type: Bugs
        Status: Closed
      Priority: 5 - Medium
     MileStone: 3.0.3
     Component: Server
      Severity: 5 - Medium
    Resolution: Fixed
---------------------------------------------------------------------

Ticket details:

kill_unit() calls player_slot_count() many times. The value returned will be the same every time, so should just call it once, and store the value in a variable. This should also help with some clang analyzer warnings that alerted me to this issue - compiler cannot know that each of those calls return the same value.

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



More information about the Freeciv-tickets mailing list
Back to archive index