| 306 | #pragma region Serial Implementation |
| 307 | |
| 308 | SZ_PUBLIC void sz_lookup_serial(sz_ptr_t result, sz_size_t length, sz_cptr_t text, char const lut[sz_at_least_(256)]) { |
| 309 | sz_u8_t const *unsigned_lut = (sz_u8_t const *)lut; |
| 310 | sz_u8_t const *unsigned_text = (sz_u8_t const *)text; |
| 311 | sz_u8_t *unsigned_result = (sz_u8_t *)result; |
| 312 | sz_u8_t const *end = unsigned_text + length; |
| 313 | for (; unsigned_text != end; ++unsigned_text, ++unsigned_result) *unsigned_result = unsigned_lut[*unsigned_text]; |
| 314 | } |
| 315 | |
| 316 | // When overriding libc, disable optimizations for this function because MSVC will optimize the loops into a `memset`. |
| 317 | // Which then causes a stack overflow due to infinite recursion (`memset` -> `sz_fill_serial` -> `memset`). |
no outgoing calls
no test coverage detected
searching dependent graphs…