tvariant: fix -Wconversion warning

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

Signed-off-by: Rosen Penev <[email protected]>
This commit is contained in:
Rosen Penev
2024-01-19 21:57:55 +01:00
committed by Urs Fleisch
parent 0318201fbd
commit 82b5ded8ee
+2 -2
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 << '"';
}