tvariant: fix -Wconversion warning

char -> wchar_t. Just directly use int and remove the cast.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2024-01-18 10:26:53 -08:00 committed by Urs Fleisch
parent 0318201fbd
commit 82b5ded8ee

View File

@ -87,9 +87,9 @@ void printStringToStream(std::ostream &s, const String &v)
void printByteVectorToStream(std::ostream &s, const String &v)
{
s << '"';
for(char c : v) {
for(int c : v) {
s << "\\x" << std::setfill('0') << std::setw(2) << std::right << std::hex
<< (static_cast<int>(c) & 0xff);
<< (c & 0xff);
}
s << std::dec << '"';
}