| 562 | } |
| 563 | |
| 564 | sugoi_mask_comp_t sugoi_group_t::get_mask(const sugoi_type_set_t& subtype) const noexcept |
| 565 | { |
| 566 | using namespace sugoi; |
| 567 | std::bitset<32> mask; |
| 568 | SIndex i = 0, j = 0; |
| 569 | auto stype = type.type; |
| 570 | while (i < stype.length && j < subtype.length) |
| 571 | { |
| 572 | if (stype.data[i] > subtype.data[j]) |
| 573 | ++j; |
| 574 | else if (stype.data[i] < subtype.data[j]) |
| 575 | ++i; |
| 576 | else |
| 577 | { |
| 578 | mask.set(i); |
| 579 | ++i; |
| 580 | ++j; |
| 581 | } |
| 582 | } |
| 583 | return mask.to_ulong(); |
| 584 | } |
| 585 | |
| 586 | extern "C" { |
| 587 | int sugoiG_has_components(const sugoi_group_t* group, const sugoi_type_set_t* types) |
no test coverage detected