| 24 | } |
| 25 | |
| 26 | SIndex archetype_t::index(sugoi_type_index_t inType) const noexcept |
| 27 | { |
| 28 | auto end = type.data + type.length; |
| 29 | const sugoi_type_index_t* result = std::lower_bound(type.data, end, inType); |
| 30 | if (result != end && *result == inType) |
| 31 | return (SIndex)(result - type.data); |
| 32 | else |
| 33 | return kInvalidSIndex; |
| 34 | } |
| 35 | } // namespace sugoi |
| 36 | |
| 37 | sugoi::archetype_t* sugoi_storage_t::construct_archetype(const sugoi_type_set_t& inType) |