GUIList has a pointer only to the start of each sort/filter func list, which has the potential for UB as it is unable to validate that the selected sort or filter type is in range.
Use a std::span instead and check if the selected type is in range before using it.
ExtractString does not need to find a string terminator as StrMakeValid already does this, so simply pass the full bounds of the buffer.
Removes lengthof, array indices, and needs only the buffer as a parameter.
SlCalcConvMemLen(), SlCalcConfFileLen() and CalcOldVarLen() follow a pattern of looking up part of a value in an array.
These function returns the size of bytes of a variable type, but is not very clear. Replace with a switch block instead.
Removes lengthof, array indices, and magic numbers.
Combine 3 separate arrays into a single struct. This keeps related data together, and avoids needing to check that each array is same length.
Use of constexpr construct ensures data in the array is not default-initialised.
Removes lengthof.
Combine two separate fixed length arrays to allow simpler iteration.
No need to check that arrays are all the same length.
No need to separately store the number of sprites to draw.
Removes the upper limit of the number of sprites that can be drawn.
Removes lengthof and array indices.
english (au): 3 changes by krysclarke
english (us): 3 changes by 2TallTyler
greek: 3 changes by gh658804
russian: 3 changes by Ln-Wolf
finnish: 5 changes by hpiirai
turkish: 7 changes by BeratSJ
portuguese: 3 changes by azulcosta
portuguese (brazilian): 3 changes by pasantoro
Default cargo label was not cleared (set to CT_INVALID) when using older 3-slot acceptance properties for house and industry tiles.
Missed in #12053 and #12062.
The BaseSet type is not needed after the window is constructed, only the filename and name are required, which can be passed as parameters from `ShowBaseSetTextfileWindow()` instead.
This avoids compiling three instances of `BaseSetTextfileWindow`.
Conversion to set default group livery is in the wrong place (not in `AfterLoadGame()`), however it is not necessary any more as `AfterLoadGame()` always calls the function `UpdateCompanyLiveries()` which will do the same thing.
Industry accepted/produced was trimmed too early for original and pre-SLV_78 saves, as cargo type was not stored per slot so all slots look invalid to the trim function.
Using Action A above the baseset is error prone as the sprites are not fixed and can be moved around.
Any NewGRF doing so is likely to break in the future, so force it to break instead.