| 161 | return (hashValue < _lookuparray.size()) ? _lookuparray[hashValue] : "<missing>"; |
| 162 | } |
| 163 | int convertString(std::string const& value) { |
| 164 | int hashValue; |
| 165 | auto itValue = _hashmap.find(value); |
| 166 | if (itValue != _hashmap.end()) { |
| 167 | hashValue = itValue->second; |
| 168 | } else { |
| 169 | hashValue = _hashmap.size(); |
| 170 | _hashmap[value] = hashValue; |
| 171 | _lookuparray.push_back(value); |
| 172 | } |
| 173 | return hashValue; |
| 174 | } |
| 175 | int convertString(char const* value) { return convertString(std::string(value)); } |
| 176 | int convertString(StringRef const& value) { return convertString(value.printable()); } |
| 177 | int convertString(Optional<Standalone<StringRef>> const& value) { |