1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2025-12-10 06:52:05 +01:00

Codechange: [Script] Use std::optional for script list next iteration item (#14753)

Avoids false positive updates in Remove when iterating the final item
and leftover values being returned when IsEnd is true
This commit is contained in:
Jonathan G Rennison
2025-11-29 17:36:41 +00:00
committed by GitHub
parent 069833963c
commit 712ca5e3ec
2 changed files with 52 additions and 32 deletions

View File

@@ -590,7 +590,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
0 => 5 (true)
2 => 6 (true)
3 => 6 (true)
9 => 0 (false)
0 => 5 (false)
Clone ListDump:
1005 => 1005
4000 => 50