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