* Access the ground vehicle cache of the vehicle. * @pre The vehicle is a #GroundVehicle. * @return #GroundVehicleCache of the vehicle. */
| 3141 | * @return #GroundVehicleCache of the vehicle. |
| 3142 | */ |
| 3143 | GroundVehicleCache *Vehicle::GetGroundVehicleCache() |
| 3144 | { |
| 3145 | assert(this->IsGroundVehicle()); |
| 3146 | if (this->type == VEH_TRAIN) { |
| 3147 | return &Train::From(this)->gcache; |
| 3148 | } else { |
| 3149 | return &RoadVehicle::From(this)->gcache; |
| 3150 | } |
| 3151 | } |
| 3152 | |
| 3153 | /** |
| 3154 | * Access the ground vehicle cache of the vehicle. |
no test coverage detected