get_max_speed() in grund_t
I am not sure if it is a bug -- please pardon me if I am wrong.
In the following code, min() in the body of the 2nd if seems to be comparing the same value, as obj_bei() is called with argument 0 in both bodies of if :
int grund_t::get_max_speed() const
{
int max = 0;
if(flags&has_way1) {
max = ((weg_t *)obj_bei(0))->get_max_speed();
}
if(flags&has_way2) {
max = min( max, ((weg_t *)obj_bei(0))->get_max_speed() );
}
return max;
}
Thank you for your attention.