| 406 | } |
| 407 | |
| 408 | uint IndexedString::indexForString(const char* str, short unsigned length, uint hash) |
| 409 | { |
| 410 | if (!length) { |
| 411 | return 0; |
| 412 | } else if (length == 1) { |
| 413 | return charToIndex(str[0]); |
| 414 | } else { |
| 415 | const auto request = IndexedStringRepositoryItemRequest(str, hash ? hash : hashString(str, length), length); |
| 416 | return LockedItemRepository::write<IndexedString>([request](IndexedStringRepository& repo) { |
| 417 | return repo.index(request); |
| 418 | }); |
| 419 | } |
| 420 | } |
| 421 | |
| 422 | uint IndexedString::indexForString(const QString& str, uint hash) |
| 423 | { |
nothing calls this directly
no test coverage detected