Commit 65aaf82b authored by Wes Turner's avatar Wes Turner

BUG: Static cast necessary for 64 bit platforms.

parent a4e1419b
......@@ -313,7 +313,7 @@ bool WriteDenseArrayAscii(const vtkStdString& type_name, vtkArray* array, ostrea
} // End anonymous namespace
vtkCxxRevisionMacro(vtkArrayWriter, "1.2");
vtkCxxRevisionMacro(vtkArrayWriter, "1.3");
vtkStandardNewMacro(vtkArrayWriter);
vtkArrayWriter::vtkArrayWriter()
......@@ -355,7 +355,7 @@ bool vtkArrayWriter::Write(ostream& stream, bool WriteBinary)
if(array_data->GetNumberOfArrays() != 1)
throw vtkstd::runtime_error("vtkArrayData with exactly one array required.");
vtkArray* const array = array_data->GetArray(0);
vtkArray* const array = array_data->GetArray(static_cast<vtkIdType>(0));
if(!array)
throw vtkstd::runtime_error("Cannot serialize NULL vtkArray.");
......
......@@ -35,7 +35,7 @@
// ----------------------------------------------------------------------
vtkCxxRevisionMacro(vtkAdjacencyMatrixToEdgeTable, "1.4");
vtkCxxRevisionMacro(vtkAdjacencyMatrixToEdgeTable, "1.5");
vtkStandardNewMacro(vtkAdjacencyMatrixToEdgeTable);
// ----------------------------------------------------------------------
......@@ -96,7 +96,8 @@ int vtkAdjacencyMatrixToEdgeTable::RequestData(
return 0;
}
vtkDenseArray<double>* const input_array = vtkDenseArray<double>::SafeDownCast(input->GetArray(0));
vtkDenseArray<double>* const input_array = vtkDenseArray<double>::SafeDownCast(
input->GetArray(static_cast<vtkIdType>(0)));
if(!input_array)
{
vtkErrorMacro(<< this->GetClassName() << " requires an input vtkDenseArray<double>.");
......
......@@ -34,7 +34,7 @@
///////////////////////////////////////////////////////////////////////////////
// vtkArrayNorm
vtkCxxRevisionMacro(vtkArrayNorm, "1.5");
vtkCxxRevisionMacro(vtkArrayNorm, "1.6");
vtkStandardNewMacro(vtkArrayNorm);
vtkArrayNorm::vtkArrayNorm() :
......@@ -100,7 +100,8 @@ int vtkArrayNorm::RequestData(
throw vtkstd::runtime_error("Missing vtkArrayData on input port 0.");
if(input_data->GetNumberOfArrays() != 1)
throw vtkstd::runtime_error("vtkArrayData on input port 0 must contain exactly one vtkArray.");
vtkTypedArray<double>* const input_array = vtkTypedArray<double>::SafeDownCast(input_data->GetArray(0));
vtkTypedArray<double>* const input_array = vtkTypedArray<double>::SafeDownCast(
input_data->GetArray(static_cast<vtkIdType>(0)));
if(!input_array)
throw vtkstd::runtime_error("vtkArray on input port 0 must be a vtkTypedArray<double>.");
if(input_array->GetDimensions() != 2)
......
......@@ -114,7 +114,7 @@ static bool ConvertMatrix(vtkArray* Array, vtkTable* Output)
// ----------------------------------------------------------------------
vtkCxxRevisionMacro(vtkArrayToTable, "1.6");
vtkCxxRevisionMacro(vtkArrayToTable, "1.7");
vtkStandardNewMacro(vtkArrayToTable);
// ----------------------------------------------------------------------
......@@ -165,7 +165,7 @@ int vtkArrayToTable::RequestData(
if(input_array_data->GetNumberOfArrays() != 1)
throw vtkstd::runtime_error("vtkArrayToTable requires a vtkArrayData containing exactly one array.");
vtkArray* const input_array = input_array_data->GetArray(0);
vtkArray* const input_array = input_array_data->GetArray(static_cast<vtkIdType>(0));
if(input_array->GetDimensions() > 2)
throw vtkstd::runtime_error("vtkArrayToTable input array must have 1 or 2 dimensions.");
......
......@@ -85,7 +85,7 @@ private:
// ----------------------------------------------------------------------
vtkCxxRevisionMacro(vtkDotProductSimilarity, "1.3");
vtkCxxRevisionMacro(vtkDotProductSimilarity, "1.4");
vtkStandardNewMacro(vtkDotProductSimilarity);
// ----------------------------------------------------------------------
......@@ -176,7 +176,8 @@ int vtkDotProductSimilarity::RequestData(
throw vtkstd::runtime_error("Missing array data input on input port 0.");
if(input_a->GetNumberOfArrays() != 1)
throw vtkstd::runtime_error("Array data on input port 0 must contain exactly one array.");
vtkDenseArray<double>* const input_array_a = vtkDenseArray<double>::SafeDownCast(input_a->GetArray(0));
vtkDenseArray<double>* const input_array_a = vtkDenseArray<double>::SafeDownCast(
input_a->GetArray(static_cast<vtkIdType>(0)));
if(!input_array_a)
throw vtkstd::runtime_error("Array on input port 0 must be a vtkDenseArray<double>.");
if(input_array_a->GetDimensions() != 2)
......@@ -188,7 +189,8 @@ int vtkDotProductSimilarity::RequestData(
{
if(input_b->GetNumberOfArrays() != 1)
throw vtkstd::runtime_error("Array data on input port 1 must contain exactly one array.");
input_array_b = vtkDenseArray<double>::SafeDownCast(input_b->GetArray(0));
input_array_b = vtkDenseArray<double>::SafeDownCast(
input_b->GetArray(static_cast<vtkIdType>(0)));
if(!input_array_b)
throw vtkstd::runtime_error("Array on input port 1 must be a vtkDenseArray<double>.");
if(input_array_b->GetDimensions() != 2)
......
......@@ -32,7 +32,7 @@
///////////////////////////////////////////////////////////////////////////////
// vtkMatricizeArray
vtkCxxRevisionMacro(vtkMatricizeArray, "1.2");
vtkCxxRevisionMacro(vtkMatricizeArray, "1.3");
vtkStandardNewMacro(vtkMatricizeArray);
vtkMatricizeArray::vtkMatricizeArray() :
......@@ -62,7 +62,8 @@ int vtkMatricizeArray::RequestData(
return 0;
}
vtkSparseArray<double>* const input_array = vtkSparseArray<double>::SafeDownCast(input->GetArray(0));
vtkSparseArray<double>* const input_array = vtkSparseArray<double>::SafeDownCast(
input->GetArray(static_cast<vtkIdType>(0)));
if(!input_array)
{
vtkErrorMacro(<< "vtkMatricizeArray requires a vtkSparseArray<double> as input.");
......
......@@ -31,7 +31,7 @@
///////////////////////////////////////////////////////////////////////////////
// vtkNormalizeMatrixVectors
vtkCxxRevisionMacro(vtkNormalizeMatrixVectors, "1.2");
vtkCxxRevisionMacro(vtkNormalizeMatrixVectors, "1.3");
vtkStandardNewMacro(vtkNormalizeMatrixVectors);
vtkNormalizeMatrixVectors::vtkNormalizeMatrixVectors() :
......@@ -63,7 +63,8 @@ int vtkNormalizeMatrixVectors::RequestData(
return 0;
}
vtkTypedArray<double>* const input_array = vtkTypedArray<double>::SafeDownCast(input->GetArray(0));
vtkTypedArray<double>* const input_array = vtkTypedArray<double>::SafeDownCast(
input->GetArray(static_cast<vtkIdType>(0)));
if(!input_array)
{
vtkErrorMacro(<< "vtkNormalizeMatrixVectors requires a vtkTypedArray<double> as input.");
......
......@@ -73,7 +73,7 @@ static bool Convert(vtkArray* Array, const char* ValueColumn, vtkTable* Table)
// ----------------------------------------------------------------------
vtkCxxRevisionMacro(vtkSparseArrayToTable, "1.1");
vtkCxxRevisionMacro(vtkSparseArrayToTable, "1.2");
vtkStandardNewMacro(vtkSparseArrayToTable);
// ----------------------------------------------------------------------
......@@ -127,7 +127,7 @@ int vtkSparseArrayToTable::RequestData(
if(input_array_data->GetNumberOfArrays() != 1)
throw vtkstd::runtime_error("vtkSparseArrayToTable requires a vtkArrayData containing exactly one array.");
vtkArray* const input_array = input_array_data->GetArray(0);
vtkArray* const input_array = input_array_data->GetArray(static_cast<vtkIdType>(0));
vtkTable* const output_table = vtkTable::GetData(outputVector);
......
......@@ -31,7 +31,7 @@
///////////////////////////////////////////////////////////////////////////////
// vtkTransposeMatrix
vtkCxxRevisionMacro(vtkTransposeMatrix, "1.3");
vtkCxxRevisionMacro(vtkTransposeMatrix, "1.4");
vtkStandardNewMacro(vtkTransposeMatrix);
vtkTransposeMatrix::vtkTransposeMatrix()
......@@ -59,7 +59,8 @@ int vtkTransposeMatrix::RequestData(
return 0;
}
if(vtkSparseArray<double>* const input_array = vtkSparseArray<double>::SafeDownCast(input->GetArray(0)))
if(vtkSparseArray<double>* const input_array = vtkSparseArray<double>::SafeDownCast(
input->GetArray(static_cast<vtkIdType>(0))))
{
if(input_array->GetDimensions() != 2)
{
......@@ -89,7 +90,8 @@ int vtkTransposeMatrix::RequestData(
}
else
{
vtkDenseArray<double>* const input_array2=vtkDenseArray<double>::SafeDownCast(input->GetArray(0));
vtkDenseArray<double>* const input_array2=vtkDenseArray<double>::SafeDownCast(
input->GetArray(static_cast<vtkIdType>(0)));
if(input_array2!=0)
{
if(input_array2->GetDimensions() != 2)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment