| 675 | } |
| 676 | |
| 677 | int GetCurrentActivePosition() const |
| 678 | { |
| 679 | if (this->active_sel != nullptr) { |
| 680 | auto it = std::ranges::find_if(this->actives, [this](const auto &c) { return c.get() == this->active_sel; }); |
| 681 | if (it != std::end(this->actives)) return static_cast<int>(std::distance(std::begin(this->actives), it)); |
| 682 | } |
| 683 | return -1; |
| 684 | } |
| 685 | |
| 686 | /** |
| 687 | * Test whether the currently active set of NewGRFs can be upgraded with the available NewGRFs. |
no test coverage detected