Xcode: fix to compile

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2024-02-21 17:51:02 +01:00
parent e01040430f
commit d738c9f8fd
3 changed files with 5 additions and 5 deletions

View File

@ -127,8 +127,8 @@ namespace stdex
_In_ int flags = match_default) = 0; _In_ int flags = match_default) = 0;
/// \cond internal /// \cond internal
template <class T = wchar_t> template <class T_out = wchar_t>
const T* next_sgml_cp(_In_ const char* text, _In_ size_t start, _In_ size_t end, _Out_ size_t& chr_end, _Out_ T(&buf)[5]) const T_out* next_sgml_cp(_In_ const char* text, _In_ size_t start, _In_ size_t end, _Out_ size_t& chr_end, _Out_ T_out(&buf)[5])
{ {
if (text[start] == '&') { if (text[start] == '&') {
// Potential entity start // Potential entity start

View File

@ -42,7 +42,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 sgml_unicode[m].unicode; return reinterpret_cast<const utf32_t*>(sgml_unicode[m].unicode);
} }
} }
} }

View File

@ -11,8 +11,8 @@ namespace stdex
{ {
/// \cond internal /// \cond internal
struct sgml_unicode_pair { struct sgml_unicode_pair {
char sgml[12]; ///< Entity name (without leading & and trailing ;) char sgml[12]; ///< Entity name (without leading & and trailing ;)
utf32_t unicode[3]; ///< UTF-32 string representation char32_t unicode[3]; ///< UTF-32 string representation
}; };
inline const sgml_unicode_pair sgml_unicode[] = { inline const sgml_unicode_pair sgml_unicode[] = {