File diff r27319:ea7c4a418203 → r27320:a815d811abc1
src/roadstop.cpp
Show inline comments
 
@@ -336,8 +336,8 @@ Vehicle *FindVehiclesInRoadStop(Vehicle 
 
	if (rv->state < RVSB_IN_ROAD_STOP) return nullptr;
 

	
 
	/* Do not add duplicates! */
 
	for (RVList::iterator it = rserh->vehicles.begin(); it != rserh->vehicles.end(); it++) {
 
		if (rv == *it) return nullptr;
 
	for (const auto &it : rserh->vehicles) {
 
		if (rv == it) return nullptr;
 
	}
 

	
 
	rserh->vehicles.push_back(rv);
 
@@ -367,8 +367,8 @@ void RoadStop::Entry::Rebuild(const Road
 
	}
 

	
 
	this->occupied = 0;
 
	for (RVList::iterator it = rserh.vehicles.begin(); it != rserh.vehicles.end(); it++) {
 
		this->occupied += (*it)->gcache.cached_total_length;
 
	for (const auto &it : rserh.vehicles) {
 
		this->occupied += it->gcache.cached_total_length;
 
	}
 
}