Commit a8c25a3c authored by Andrew Bauer's avatar Andrew Bauer Committed by Kitware Robot
Browse files

Merge topic 'RemoveArray_cleanup'

9e082eee

 Cleanup RemoveArray implementations in vtkFieldData and vtkDataSetAttributes
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !1542
parents 785fa0f0 9e082eee
......@@ -1574,14 +1574,6 @@ int vtkDataSetAttributes::GetCopyPedigreeIds(int ctype)
}
}
//--------------------------------------------------------------------------
void vtkDataSetAttributes::RemoveArray(const char *name)
{
int i;
this->GetAbstractArray(name, i);
this->RemoveArray(i);
}
//--------------------------------------------------------------------------
void vtkDataSetAttributes::CopyAllocate(
vtkDataSetAttributes::FieldList& list,
......
......@@ -255,7 +255,7 @@ public:
// Description:
// Remove an array (with the given name) from the list of arrays.
virtual void RemoveArray(const char *name);
using vtkFieldData::RemoveArray;
virtual void RemoveArray(int index);
......
......@@ -554,6 +554,14 @@ int vtkFieldData::AddArray(vtkAbstractArray *array)
return index;
}
//--------------------------------------------------------------------------
void vtkFieldData::RemoveArray(const char *name)
{
int i;
this->GetAbstractArray(name, i);
this->RemoveArray(i);
}
//----------------------------------------------------------------------------
void vtkFieldData::RemoveArray(int index)
{
......
......@@ -98,13 +98,9 @@ public:
int AddArray(vtkAbstractArray *array);
// Description:
// Remove an array (with the given name) from the list of arrays.
virtual void RemoveArray(const char *name)
{
int i;
this->GetAbstractArray(name, i);
this->RemoveArray(i);
}
// Remove an array (with the given name or index) from the list of arrays.
virtual void RemoveArray(const char *name);
virtual void RemoveArray(int index);
// Description:
// Return the ith array in the field. A NULL is returned if the
......@@ -311,8 +307,6 @@ protected:
// Set an array to define the field.
void SetArray(int i, vtkAbstractArray *array);
virtual void RemoveArray(int index);
// Description:
// Release all data but do not delete object.
virtual void InitializeFields();
......
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