| 78 | } |
| 79 | |
| 80 | return false; |
| 81 | } |
| 82 | |
| 83 | // ─── Boundary detection ───────────────────────────────────────────────── |
| 84 | |
| 85 | static bool seq_at(const std::vector<int32_t> & ids, int idx, |
| 86 | const std::vector<int32_t> & seq) { |
| 87 | if (idx < 0 || idx + (int)seq.size() > (int)ids.size()) return false; |
| 88 | for (int k = 0; k < (int)seq.size(); k++) { |
| 89 | if (ids[idx + k] != seq[k]) return false; |
| 90 | } |
| 91 | return true; |
| 92 | } |
| 93 | |
| 94 | static int find_first_seq(const std::vector<int32_t> & ids, |
| 95 | const std::vector<int32_t> & seq, int start = 0) { |
no test coverage detected