Fix VTKDataSetWriter writing char types

This commit is contained in:
Sujin Philip 2021-07-22 14:19:21 -04:00
parent bf6d6ca517
commit 9bb10b3961

@ -96,7 +96,15 @@ struct OutputArrayDataFunctor
auto value = portal.Get(valueIndex);
for (vtkm::IdComponent cIndex = 0; cIndex < value.GetNumberOfComponents(); ++cIndex)
{
out << ((cIndex == 0) ? "" : " ") << value[cIndex];
out << ((cIndex == 0) ? "" : " ");
if (std::numeric_limits<T>::is_integer && sizeof(T) == 1)
{
out << static_cast<int>(value[cIndex]);
}
else
{
out << value[cIndex];
}
}
out << "\n";
}