OpenTTD

Tasklist

FS#5695 - Patch to make filter_funcs members of BuildVehicleWindow

Attached to Project: OpenTTD
Opened by Vaulter (Vaulter) - Sunday, 04 August 2013, 20:40 GMT
Type Patch
Category Core
Status New
Assigned To No-one
Operating System All
Severity Very Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Subj.
I see that this one filter func dont use anything window class specific, but... it is just
This task depends upon

Comment by Alberth (Alberth) - Saturday, 02 September 2017, 08:38 GMT
Just moving a single static function into a class in the same file doesn't help much, given that static functions are common in OpenTTD (and perhaps even in C++, as not everything has to be a method or part of a class in that language).

The patch also breaks the general pattern of all the other filter functions, which makes it less easy to find and re-use if the need arises.


In other words, while the thought is alright, the scale is too small.

If you want to move these functions, it needs a new general pattern of handling these filter functions (or handling filtered lists, or something else, where the filter functions are apart of).
From such a new pattern you can then change all filter functions, and improve the general structure.



Comment by andythenorth (andythenorth) - Saturday, 09 September 2017, 16:04 GMT
Close if no reply by end of 2017. Thanks.

Loading...