station_cmd.c
changeset 4397 e538e96d8f6a
parent 4393 1e3d47fcdab6
child 4398 e889842a75a1
equal deleted inserted replaced
4396:549f28155809 4397:e538e96d8f6a
   151 
   151 
   152 	/* We don't use FOR_ALL here, because FOR_ALL skips invalid items.
   152 	/* We don't use FOR_ALL here, because FOR_ALL skips invalid items.
   153 	 * TODO - This is just a temporary stage, this will be removed. */
   153 	 * TODO - This is just a temporary stage, this will be removed. */
   154 	for (rs = GetRoadStop(0); rs != NULL; rs = (rs->index + 1 < GetRoadStopPoolSize()) ? GetRoadStop(rs->index + 1) : NULL) {
   154 	for (rs = GetRoadStop(0); rs != NULL; rs = (rs->index + 1 < GetRoadStopPoolSize()) ? GetRoadStop(rs->index + 1) : NULL) {
   155 		if (!IsValidRoadStop(rs)) {
   155 		if (!IsValidRoadStop(rs)) {
   156 			uint index = rs->index;
   156 			RoadStopID index = rs->index;
   157 
   157 
   158 			memset(rs, 0, sizeof(*rs));
   158 			memset(rs, 0, sizeof(*rs));
   159 			rs->index = index;
   159 			rs->index = index;
   160 
   160 
   161 			return rs;
   161 			return rs;