(update to the new pikotools api): use a char32_t character as a main character when converting strings

Use a char32_t instead of a wchar_t type. This is needed on systems
where sizeof(wchar_t) is equal to 2.

This affects classes based on the pt::Stream such as Log and HtmlTextStream.
This commit is contained in:
2024-06-01 00:33:15 +02:00
parent af0d34beb9
commit 5d457f3d4b
4 changed files with 56 additions and 30 deletions

View File

@@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2010-2022, Tomasz Sowa
* Copyright (c) 2010-2024, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -148,6 +148,7 @@ public:
HtmlTextStream & PutChar(char c);
HtmlTextStream & PutChar(unsigned char c);
HtmlTextStream & PutChar(wchar_t c);
HtmlTextStream & PutChar(char32_t c);
HtmlTextStream & PutChar(bool val);
@@ -171,6 +172,7 @@ public:
HtmlTextStream & operator<<(RawText<char> raw);
HtmlTextStream & operator<<(RawText<unsigned char> raw);
HtmlTextStream & operator<<(RawText<wchar_t> raw);
HtmlTextStream & operator<<(RawText<char32_t> raw);
HtmlTextStream & operator<<(RawText<bool> raw);
HtmlTextStream & operator<<(RawText<short> raw);
@@ -219,6 +221,7 @@ public:
HtmlTextStream & ETextPutChar(char c);
HtmlTextStream & ETextPutChar(unsigned char c);
HtmlTextStream & ETextPutChar(wchar_t c);
HtmlTextStream & ETextPutChar(char32_t c);
/*
@@ -234,6 +237,7 @@ public:
HtmlTextStream & operator<<(char);
HtmlTextStream & operator<<(unsigned char);
HtmlTextStream & operator<<(wchar_t);
HtmlTextStream & operator<<(char32_t);
HtmlTextStream & operator<<(bool);
HtmlTextStream & operator<<(short);
HtmlTextStream & operator<<(int);