* Get the feature index. * @return the feature index */
| 304 | * @return the feature index |
| 305 | */ |
| 306 | uint GetFeatureIndex() const |
| 307 | { |
| 308 | uint index = ::GetFeatureIndex(this->window_number); |
| 309 | if (this->chain_index > 0) { |
| 310 | assert(this->HasChainIndex()); |
| 311 | const Vehicle *v = Vehicle::Get(index); |
| 312 | v = v->Move(this->chain_index); |
| 313 | if (v != nullptr) index = v->index.base(); |
| 314 | } |
| 315 | return index; |
| 316 | } |
| 317 | |
| 318 | /** |
| 319 | * Ensure that this->chain_index is in range. |
no test coverage detected