Incidencia #44879

end_turn() debug statistics cumulative, not per player

Abrir Fecha: 2022-06-20 21:40 Última actualización: 2022-06-28 13:43

Informador:
Propietario:
Tipo:
Estado:
Cerrado
Componente:
Prioridad:
5 - Medium
Gravedad:
5 - Medium
Resolución:
Fixed
Fichero:
2

Details

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
  • Propietario Update from (Ninguno) to cazfi
  • Resolución Update from Ninguno to Accepted
  • Hito Update from (Ninguno) to 3.0.3 (cerrado)
2022-06-28 13:43 Updated by: cazfi
  • Estado Update from Open to Cerrado
  • Resolución Update from Accepted to Fixed

Attachment File List

Editar

Please login to add comment to this ticket » Entrar