Skip to content
Snippets Groups Projects
Commit f3f99fac authored by Will Schroeder's avatar Will Schroeder
Browse files

Fixed different type comparison

parent 9fa17cdb
No related merge requests found
......@@ -302,15 +302,15 @@ int vtkPackLabels::RequestData(
else
{
// Create smallest type that can represent N labels
if (N < std::numeric_limits<unsigned char>::max())
if (N < static_cast<vtkIdType>(std::numeric_limits<unsigned char>::max()))
{
outScalars.TakeReference(vtkDataArray::CreateDataArray(VTK_UNSIGNED_CHAR));
}
else if (N < std::numeric_limits<unsigned short>::max())
else if (N < static_cast<vtkIdType>(std::numeric_limits<unsigned short>::max()))
{
outScalars.TakeReference(vtkDataArray::CreateDataArray(VTK_UNSIGNED_SHORT));
}
else if (N < std::numeric_limits<unsigned int>::max())
else if (N < static_cast<vtkIdType>(std::numeric_limits<unsigned int>::max()))
{
outScalars.TakeReference(vtkDataArray::CreateDataArray(VTK_UNSIGNED_INT));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment