sgml: address signed/unsigned warnings

The sgml_unicode.hpp stores UTF-32 strings in
stdex::sgml_unicode_pair::unicode.  Hence stdex::utf32_t should be used as
its datatype.  Unfortunately, that doesn't work with U string literal: U
requires hundreds of typecasts to make it fit stdex::utf32_t, since char32_t
is signed, stdex::utf32_t is unsigned.  OTOH, L string literal cannot be
used on Windows (produces UTF-16, not UTF-32).

Reported-by: Xcode
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2024-05-27 14:44:29 +02:00
parent ea2f129577
commit 146c9c948d
2 changed files with 1548 additions and 1538 deletions

View File

@ -41,7 +41,7 @@ namespace stdex
j = m; j = m;
else { else {
for (; i < m && strncmp<char, T>(sgml_unicode[m - 1].sgml, _countof(sgml_unicode[0].sgml), entity, count) == 0; m--); for (; i < m && strncmp<char, T>(sgml_unicode[m - 1].sgml, _countof(sgml_unicode[0].sgml), entity, count) == 0; m--);
return reinterpret_cast<const utf32_t*>(sgml_unicode[m].unicode); return sgml_unicode[m].unicode;
} }
} }
} }

File diff suppressed because it is too large Load Diff