Ticket #44130

path_finding.c: Asserts comparing things to TRUE

Eröffnet am: 2022-03-17 10:59 Letztes Update: 2022-04-18 12:30

Auswertung:
Verantwortlicher:
Typ:
Status:
Geschlossen
Komponente:
Meilenstein:
Priorität:
5 - Mittel
Schweregrad:
5 - Mittel
Lösung:
Gefixt
Datei:
3

Details

path_finding.c has some asserts where a value is compared to TRUE with a '=='. One should not do that as TRUE is a macro with specific value (1), and does not match other (non-zero) values though those too indicate true.

Ticket-Verlauf (3/11 Historien)

2022-03-17 10:59 Aktualisiert von: cazfi
  • New Ticket "path_finding.c: Asserts comparing things to TRUE" created
2022-03-17 11:47 Aktualisiert von: cazfi
Kommentar

There's more of them all around the codebase when one greps for "TRUE ==", "FALSE ==", "== TRUE", "== FALSE", "TRUE !=", "FALSE !=", "!= TRUE", "!= FALSE"

Not all of them even in asserts. Limiting scope of this ticket to asserts, though.

2022-03-18 04:39 Aktualisiert von: cazfi
2022-04-09 04:24 Aktualisiert von: cazfi
  • Verantwortlicher Update from (Keine) to cazfi
  • Lösung Update from Keine to Accepted
2022-04-12 15:10 Aktualisiert von: cazfi
  • Lösung Update from Accepted to Keine
Kommentar

S3_0 version misses savegame2.c (at least) "load_success == TRUE" case.

2022-04-13 02:04 Aktualisiert von: cazfi
  • Lösung Update from Keine to Accepted
Kommentar

Reply To cazfi

S3_0 version misses savegame2.c (at least) "load_success == TRUE" case.

- Fixed

2022-04-17 13:00 Aktualisiert von: cazfi
Kommentar

Reply To cazfi

Not all of them even in asserts. Limiting scope of this ticket to asserts, though.

Rest -> #44401

2022-04-18 12:30 Aktualisiert von: cazfi
  • Status Update from Offen to Geschlossen
  • Lösung Update from Accepted to Gefixt

Bearbeiten

Please login to add comment to this ticket » Anmelden