| 339 | |
| 340 | template <typename KeyToIndex, typename Key> |
| 341 | const int* GetIndex(const KeyToIndex& key_to_index, const Key& key) { |
| 342 | auto it = key_to_index.find(key); |
| 343 | if (it == key_to_index.end()) return nullptr; |
| 344 | return &it->second; |
| 345 | } |
| 346 | |
| 347 | namespace { |
| 348 |