mirror of https://github.com/OpenTTD/OpenTTD
Codefix: checking unsigned int >= 0 is pointless, check before subtraction
parent
ce2155ab27
commit
3235ec4cf8
|
@ -268,8 +268,8 @@ bool RoadStop::Enter(RoadVehicle *rv)
|
||||||
*/
|
*/
|
||||||
void RoadStop::Entry::Leave(const RoadVehicle *rv)
|
void RoadStop::Entry::Leave(const RoadVehicle *rv)
|
||||||
{
|
{
|
||||||
|
assert(this->occupied >= rv->gcache.cached_total_length);
|
||||||
this->occupied -= rv->gcache.cached_total_length;
|
this->occupied -= rv->gcache.cached_total_length;
|
||||||
assert(this->occupied >= 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue