MCPcopy Create free account
hub / github.com/Norbyte/ositools / ScanPrefix2

Method ScanPrefix2

OsiInterface/DataLibraries.cpp:105–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected