待辦事項 #44797

kill_unit() constantly calling player_slot_count()

啟用日期: 2022-06-11 21:47 最後更新: 2022-06-29 06:25

回報者:
負責人:
類型:
狀態:
關閉
元件:
里程碑:
優先權:
5 - 中
嚴重程度:
5 - 中
處理結果:
修正
檔案:
1

細節

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 History (3/4 Histories)

2022-06-11 21:47 Updated by: cazfi
  • New Ticket "kill_unit() constantly calling player_slot_count()" created
2022-06-21 22:53 Updated by: cazfi
  • 負責人 Update from (無) to cazfi
  • 處理結果 Update from to Accepted
2022-06-29 06:25 Updated by: cazfi
  • 狀態 Update from 開啟 to 關閉
  • 處理結果 Update from Accepted to 修正

編輯

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » 登入