Commit d744e3a1 authored by David Gobbi's avatar David Gobbi Committed by Marcus D. Hanwell
Browse files

COMP: vtkIdList::IntersectWith(vtkIdList &) should be "vtkIdList *"

This must be a holdover from long, long ago when VTK used references
instead of pointers for VTK objects.
parent 3617f616
...@@ -185,7 +185,7 @@ vtkIdType *vtkIdList::Resize(const vtkIdType sz) ...@@ -185,7 +185,7 @@ vtkIdType *vtkIdList::Resize(const vtkIdType sz)
#define VTK_TMP_ARRAY_SIZE 500 #define VTK_TMP_ARRAY_SIZE 500
// Intersect this list with another vtkIdList. Updates current list according // Intersect this list with another vtkIdList. Updates current list according
// to result of intersection operation. // to result of intersection operation.
void vtkIdList::IntersectWith(vtkIdList& otherIds) void vtkIdList::IntersectWith(vtkIdList* otherIds)
{ {
// Fast method due to Dr. Andreas Mueller of ISE Integrated Systems // Fast method due to Dr. Andreas Mueller of ISE Integrated Systems
// Engineering (CH). // Engineering (CH).
...@@ -203,7 +203,7 @@ void vtkIdList::IntersectWith(vtkIdList& otherIds) ...@@ -203,7 +203,7 @@ void vtkIdList::IntersectWith(vtkIdList& otherIds)
for (this->Reset(), i=0; i < thisNumIds; i++) for (this->Reset(), i=0; i < thisNumIds; i++)
{ {
vtkid = thisIds[i]; vtkid = thisIds[i];
if ( otherIds.IsId(vtkid) != (-1) ) if ( otherIds->IsId(vtkid) != (-1) )
{ {
this->InsertNextId(vtkid); this->InsertNextId(vtkid);
} }
...@@ -221,7 +221,7 @@ void vtkIdList::IntersectWith(vtkIdList& otherIds) ...@@ -221,7 +221,7 @@ void vtkIdList::IntersectWith(vtkIdList& otherIds)
for (this->Reset(), i=0; i < thisNumIds; i++) for (this->Reset(), i=0; i < thisNumIds; i++)
{ {
vtkid = *(thisIds + i); vtkid = *(thisIds + i);
if ( otherIds.IsId(vtkid) != (-1) ) if ( otherIds->IsId(vtkid) != (-1) )
{ {
this->InsertNextId(vtkid); this->InsertNextId(vtkid);
} }
......
...@@ -100,7 +100,13 @@ public: ...@@ -100,7 +100,13 @@ public:
// Description: // Description:
// Intersect this list with another vtkIdList. Updates current list according // Intersect this list with another vtkIdList. Updates current list according
// to result of intersection operation. // to result of intersection operation.
void IntersectWith(vtkIdList& otherIds); void IntersectWith(vtkIdList* otherIds);
//BTX
// This method should become legacy
void IntersectWith(vtkIdList& otherIds) {
return this->IntersectWith(&otherIds); };
//ETX
protected: protected:
vtkIdList(); vtkIdList();
......
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