| 551 | } |
| 552 | |
| 553 | void HighsNameHash::update(int index, const std::string& old_name, |
| 554 | const std::string& new_name) { |
| 555 | this->name2index.erase(old_name); |
| 556 | auto emplace_result = this->name2index.emplace(new_name, index); |
| 557 | if (!emplace_result.second) { |
| 558 | // Find the original and mark it as duplicate |
| 559 | auto& search = emplace_result.first; |
| 560 | assert(int(search->second) < int(this->name2index.size())); |
| 561 | search->second = kHashIsDuplicate; |
| 562 | } |
| 563 | } |
| 564 | |
| 565 | void HighsNameHash::clear() { this->name2index.clear(); } |
no test coverage detected