Ticket #44797

kill_unit() constantly calling player_slot_count()

Date d'ouverture: 2022-06-11 21:47 Dernière mise à jour: 2022-06-29 06:25

Rapporteur:
Propriétaire:
Type:
État:
Atteints
Composant:
Priorité:
5 - moyen
Sévérité:
5 - moyen
Résolution:
Fixed
Fichier:
1

Détails

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
  • Propriétaire Update from (Aucun) to cazfi
  • Résolution Update from Aucun to Accepted
2022-06-29 06:25 Updated by: cazfi
  • État Update from Ouvert to Atteints
  • Résolution Update from Accepted to Fixed

Modifier

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