Incidencia #44930

unit_tech_reqs_iterate()

Abrir Fecha: 2022-06-24 23:22 Última actualización: 2022-07-17 15:11

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

Details

Add iterator macros unit_tech_reqs_iterate() and unit_tech_reqs_iterate_end, and use them instead of accessing unit_type->require_advance directly.

That prepares us for later retire require_advance.

Ticket History (3/10 Histories)

2022-06-24 23:22 Updated by: cazfi
  • New Ticket "unit_tech_reqs_iterate()" created
2022-06-25 10:12 Updated by: cazfi
Comentario

Not strictly dependencies of implementing this, but make sense to implement first as they would conflict with this: #44926, #44941

2022-06-27 06:11 Updated by: cazfi
Comentario

My working version of the patch has something that has not been our convention, but might make sense to introduce here. It adds struct "_remove" within unit_type struct, and moves "require_advance" in there. The idea is that it should alert any contributors to the fact that no new code should use "require_advance" that's going to be retired (hmm.. maybe "_retire" would be better than "_remove"?)

Thoughts?

2022-06-27 18:04 Updated by: alienvalkyrie
Comentario

Reply To cazfi

My working version of the patch has something that has not been our convention, but might make sense to introduce here. It adds struct "_remove" within unit_type struct, and moves "require_advance" in there. The idea is that it should alert any contributors to the fact that no new code should use "require_advance" that's going to be retired (hmm.. maybe "_retire" would be better than "_remove"?) Thoughts?

Might be sensible to make something like this a convention, some general way to mark code-internal things as deprecated; whether that's via moving those things into sub-structs, renaming them accordingly, or adding an attribute (or some other way) is a decision I'd rather leave to the people with more C experience.

2022-07-05 09:18 Updated by: cazfi
  • Propietario Update from (Ninguno) to cazfi
  • Resolución Update from Ninguno to Accepted
2022-07-05 20:35 Updated by: cazfi
  • Resolución Update from Accepted to Ninguno
Comentario

The main unit_tech_reqs_iterate() confuses advance pointers and advance number A_NONE.

2022-07-06 01:13 Updated by: cazfi
  • Resolución Update from Ninguno to Accepted
Comentario

- Many bugs with A_NONE used as a pointer, or compared against a pointer, fixed

2022-07-17 15:11 Updated by: cazfi
  • Estado Update from Open to Cerrado
  • Resolución Update from Accepted to Fixed

Editar

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