| 596 | } |
| 597 | |
| 598 | void removeCompany(CompanyId id) |
| 599 | { |
| 600 | auto* window = WindowManager::find(WindowType::companyList); |
| 601 | if (window == nullptr) |
| 602 | { |
| 603 | return; |
| 604 | } |
| 605 | |
| 606 | auto list = std::span<CompanyId>(reinterpret_cast<CompanyId*>(window->rowInfo), window->rowCount); |
| 607 | |
| 608 | auto newEnd = std::remove_if(list.begin(), list.end(), [id](CompanyId el) { return el == id; }); |
| 609 | auto numRemoved = std::distance(newEnd, list.end()); |
| 610 | |
| 611 | if (numRemoved > 0) |
| 612 | { |
| 613 | window->rowCount -= numRemoved; |
| 614 | } |
| 615 | |
| 616 | WindowManager::invalidate(WindowType::companyList); |
| 617 | } |
| 618 | |
| 619 | // 0x00435C69 |
| 620 | void openPerformanceIndexes() |
no test coverage detected