You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We appear to have min as a template and as a function (along with minu), but the functions and the template do different things if a == b. This strikes me as a disaster waiting to happen, somehow. ;-)
P.S. Sorry I couldn't come and mention it on IRC, but this weekend is becoming ridiculously busy for me. :-)
How can this ever be a real problem?
a < b => always a
a > b => always b
a == b => we really do not care as a and b have the same value.
Secondly the min and minu functions are there so the C++ compiler can 'easily' find out how to match it as there are loads of places where the input parameters are not the same. Comparing uint and uint16 for example. Unless you have a good idea how to make the template in such a manner that it does "the right thing", I don't think there is a chance of getting the min and minu functions removed.
Maedhros opened the ticket and wrote:
Reported version: trunk
Operating system: All
This issue was imported from FlySpray: https://bugs.openttd.org/task/1391
The text was updated successfully, but these errors were encountered: