| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1441,9 +1441,9 @@ uint32_t WriteOneByteString(const char* src, | |||
| 1441 | 1441 | return 0; | |
| 1442 | 1442 | } | |
| 1443 | 1443 | ||
| 1444 | - if (encoding == UTF8) { | ||
| 1444 | + if constexpr (encoding == UTF8) { | ||
| 1445 | 1445 | return simdutf::convert_latin1_to_utf8_safe(src, src_len, dst, dst_len); | |
| 1446 | - } else if (encoding == LATIN1 || encoding == ASCII) { | ||
| 1446 | + } else if constexpr (encoding == LATIN1 || encoding == ASCII) { | ||
| 1447 | 1447 | const auto size = std::min(src_len, dst_len); | |
| 1448 | 1448 | memcpy(dst, src, size); | |
| 1449 | 1449 | return size; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments