| 674 | } |
| 675 | |
| 676 | int32_t Get(const void* data, builder_offset_type length) const { |
| 677 | hash_t h = ComputeStringHash<0>(data, length); |
| 678 | auto p = Lookup(h, data, length); |
| 679 | if (p.second) { |
| 680 | return p.first->payload.memo_index; |
| 681 | } else { |
| 682 | return kKeyNotFound; |
| 683 | } |
| 684 | } |
| 685 | |
| 686 | int32_t Get(std::string_view value) const { |
| 687 | return Get(value.data(), static_cast<builder_offset_type>(value.length())); |