Skip to content

Commit

Permalink
fix: cast wchar_t and char16_t to uints for sstream
Browse files Browse the repository at this point in the history
Signed-off-by: Russ Webber <[email protected]>
  • Loading branch information
russkel committed Jul 29, 2022
1 parent 248462e commit db68001
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/xtypes/DynamicDataImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ inline std::string ReadableDynamicDataRef::to_string() const
ss << "<" << type_name << "> " << node.data().value<char>();
break;
case TypeKind::CHAR_16_TYPE:
ss << "<" << type_name << "> " << node.data().value<char16_t>();
ss << "<" << type_name << "> " << static_cast<uint16_t>(node.data().value<char16_t>());
break;
case TypeKind::WIDE_CHAR_TYPE:
ss << "<" << type_name << "> " << node.data().value<wchar_t>();
ss << "<" << type_name << "> " << static_cast<uint32_t>(node.data().value<wchar_t>());
break;
case TypeKind::INT_8_TYPE:
ss << "<" << type_name << "> " << node.data().value<int8_t>();
Expand Down

0 comments on commit db68001

Please sign in to comment.