1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-31 18:39:10 +00:00

Codefix: checking unsigned int >= 0 is pointless, check before subtraction

This commit is contained in:
Rubidium
2025-04-26 16:34:24 +02:00
committed by rubidium42
parent ce2155ab27
commit 3235ec4cf8

View File

@@ -268,8 +268,8 @@ bool RoadStop::Enter(RoadVehicle *rv)
*/
void RoadStop::Entry::Leave(const RoadVehicle *rv)
{
assert(this->occupied >= rv->gcache.cached_total_length);
this->occupied -= rv->gcache.cached_total_length;
assert(this->occupied >= 0);
}
/**