mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
Replace spaces by underscores in SCALAR name field.
This commit is contained in:
parent
b3d170f2d9
commit
98dbf7c1a9
@ -10,6 +10,7 @@
|
||||
#ifndef vtk_m_io_writer_DataSetWriter_h
|
||||
#define vtk_m_io_writer_DataSetWriter_h
|
||||
|
||||
#include <cctype>
|
||||
#include <vtkm/CellShape.h>
|
||||
|
||||
#include <vtkm/cont/CellSetExplicit.h>
|
||||
@ -237,8 +238,15 @@ private:
|
||||
std::string typeName;
|
||||
vtkm::cont::CastAndCall(field.GetData().ResetTypes(TypeListAll{}),
|
||||
detail::GetDataTypeName(typeName));
|
||||
|
||||
out << "SCALARS " << field.GetName() << " " << typeName << " " << ncomps << std::endl;
|
||||
std::string name = field.GetName();
|
||||
for (auto& c : name)
|
||||
{
|
||||
if (std::isspace(c))
|
||||
{
|
||||
c = '_';
|
||||
}
|
||||
}
|
||||
out << "SCALARS " << name << " " << typeName << " " << ncomps << std::endl;
|
||||
out << "LOOKUP_TABLE default" << std::endl;
|
||||
|
||||
vtkm::cont::CastAndCall(field.GetData().ResetTypes(TypeListAll{}),
|
||||
@ -273,7 +281,16 @@ private:
|
||||
vtkm::cont::CastAndCall(field.GetData().ResetTypes(TypeListAll{}),
|
||||
detail::GetDataTypeName(typeName));
|
||||
|
||||
out << "SCALARS " << field.GetName() << " " << typeName << " " << ncomps << std::endl;
|
||||
std::string name = field.GetName();
|
||||
for (auto& c : name)
|
||||
{
|
||||
if (std::isspace(c))
|
||||
{
|
||||
c = '_';
|
||||
}
|
||||
}
|
||||
|
||||
out << "SCALARS " << name << " " << typeName << " " << ncomps << std::endl;
|
||||
out << "LOOKUP_TABLE default" << std::endl;
|
||||
|
||||
vtkm::cont::CastAndCall(field.GetData().ResetTypes(TypeListAll{}),
|
||||
|
Loading…
Reference in New Issue
Block a user