| 103 | } |
| 104 | |
| 105 | void Pattern::ScanPrefix2(uint8_t const * start, uint8_t const * end, std::function<void(uint8_t const *)> callback, bool multiple) |
| 106 | { |
| 107 | uint16_t initial = pattern_[0].pattern |
| 108 | | (pattern_[1].pattern << 8); |
| 109 | |
| 110 | for (auto p = start; p < end; p++) { |
| 111 | if (*reinterpret_cast<uint16_t const *>(p) == initial) { |
| 112 | if (MatchPattern(p)) { |
| 113 | callback(p); |
| 114 | if (!multiple) return; |
| 115 | } |
| 116 | } |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | void Pattern::ScanPrefix4(uint8_t const * start, uint8_t const * end, std::function<void(uint8_t const *)> callback, bool multiple) |
| 121 | { |
nothing calls this directly
no outgoing calls
no test coverage detected