Ticket #46172

Move counter initialization routine outside ruleset initialization code, so ruledit could use it

Eröffnet am: 2022-12-04 01:08 Letztes Update: 2022-12-17 22:24

Auswertung:
Verantwortlicher:
(Keine)
Typ:
Status:
Offen
Komponente:
Meilenstein:
(Keine)
Priorität:
5 - Mittel
Schweregrad:
5 - Mittel
Lösung:
Keine
Datei:
3

Details

Currently, counter initialization code is placed inside ruleset loading code. This makes sense in past, because there was no other parts, which would use it. Currently, ruledit need to reinitialize and initialize counters, what means ruledit_enable is set to default value, name struct was free/reinitialized, etc.

Ticket-Verlauf (3/12 Historien)

2022-12-04 01:08 Aktualisiert von: lachu
  • New Ticket "Move counter initialization routine outside ruleset initialization code, so ruledit could use it" created
2022-12-04 05:57 Aktualisiert von: lachu
Kommentar

Done.

I realized I still cannot remove code from ruleset.c, but with current code reinitialize counters should be possible. From what should I known, I can reuse counter entry in counter's array? Does ruledit do that for other artifacts?

2022-12-04 06:01 Aktualisiert von: lachu
Kommentar

One bug gets fixed, sorry.

2022-12-06 11:53 Aktualisiert von: cazfi
  • Typ Update from Funktionsanfragen to Patches
  • Priorität Update from 4 to 5 - Mittel
Kommentar

+ pcounter->ruledit_disabled = false;

Should be FALSE in freeciv C-code (we can use false in C++)

--

+#include <stdbool.h>

Include (utility/)support.h for getting bool defined by portable way (even when there's no stdbool.h header in the system)

2022-12-09 02:00 Aktualisiert von: lachu
  • File 0001-Further-work-to-integrate-counter-init-code-with-rul.patch (File ID: 11063) is attached
2022-12-09 02:01 Aktualisiert von: lachu
Kommentar

Reply To cazfi

+ pcounter->ruledit_disabled = false; Should be FALSE in freeciv C-code (we can use false in C++) -- +#include <stdbool.h> Include (utility/)support.h for getting bool defined by portable way (even when there's no stdbool.h header in the system)

0001-Further-work-to-integrate-counter-init-code-with-rul.patch(2KB)
Repair coding-style
2022-12-09 14:45 Aktualisiert von: cazfi
Kommentar

Patch seem to include unrelated changes (parts of #45891?), and build on top of the previous one instead of replacing it.

2022-12-17 22:24 Aktualisiert von: cazfi
  • Verantwortlicher Update from cazfi to (Keine)
2023-01-03 20:44 Aktualisiert von: lachu
  • File 0001-Further-work-to-integrate-counter-init-code-with-rul.patch (File ID: 11063) is deleted

Dateianhangliste

Bearbeiten

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