Ticket #44879

end_turn() debug statistics cumulative, not per player

Date d'ouverture: 2022-06-20 21:40 Dernière mise à jour: 2022-06-28 13:43

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

Détails

First of all the code in question causes compiler warning (with some compilers) when FREECIV_DEBUG is not defined - set of variables are only used in log_debug(), which expands to nothing without FREECIV_DEBUG, so otherwise those variables are "set but unused". This should be cleared also for optimization reasons, so that we don't calculate those unused stats.

Even if the log_debug() would show the stats, calculated ones are not per-player as one would assume from the player name and other player-specific ones. Those stats are zeroed only before iterating the players, not for each player, so they accumulate over players iterated.

Ticket History (3/5 Histories)

2022-06-20 21:40 Updated by: cazfi
  • New Ticket "end_turn() debug statistics cumulative, not per player" created
2022-06-22 01:44 Updated by: cazfi
  • Propriétaire Update from (Aucun) to cazfi
  • Résolution Update from Aucun to Accepted
  • Jalon Update from (Aucun) to 3.0.3 (atteints)
2022-06-28 13:43 Updated by: cazfi
  • État Update from Ouvert to Atteints
  • Résolution Update from Accepted to Fixed

Attachment File List

Modifier

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