Commit 19d6685d authored by Sean McBride's avatar Sean McBride Committed by Kitware Robot

Merge topic 'better-bool'

7461b5d4 Converted ContainsPoint() API from int to vtkTypeBool
6d1636ce Changed HasObserver return value from int to vtkTypeBool
023fdc88 Changed a few int to vtkTypeBool in doxyfile
c366cb94 Applied vtkTypeBool to IntersectWithPlane method
e0d93256 Manually changed some methods that start with IsA to use vtkTypeBool
85b00f75 Change IsAtEnd() method return type from int to vtkTypeBool
ffc3ec2e Some manual fixes for Resize()
b7ca55e4 Change Resize() method return type from int to vtkTypeBool
...
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Reviewed-by: David Gobbi's avatarDavid Gobbi <david.gobbi@gmail.com>
Merge-request: !4309
parents d147a82a 7461b5d4
......@@ -161,7 +161,7 @@ vtkSmartPointer<vtkDataArray> CreateDataArray()
//------------------------vtkAbstactArray API-----------------------------------
// int Allocate(vtkIdType numValues, vtkIdType ext=1000)
// vtkTypeBool Allocate(vtkIdType numValues, vtkIdType ext=1000)
// Sets MaxId == -1
// Sets Size >= numValues
// If numValues == 0, delete the array.
......@@ -170,7 +170,7 @@ vtkSmartPointer<vtkDataArray> CreateDataArray()
template <typename ScalarT, typename ArrayT>
int Test_int_Allocate_numValues_ext()
{
DataArrayAPIInit("int Allocate(vtkIdType numValues, vtkIdType ext)");
DataArrayAPIInit("vtkTypeBool Allocate(vtkIdType numValues, vtkIdType ext)");
DataArrayAPICreateTestArray(array);
int success = array->Allocate(0);
......@@ -1381,13 +1381,13 @@ int Test_void_InterpolateTuple_i_id1_source1_id2_source2_t()
DataArrayAPIFinish();
}
// int Resize(vtkIdType numTuples)
// vtkTypeBool Resize(vtkIdType numTuples)
// Preserve data
// Return 1 on success, 0 otherwise
template <typename ScalarT, typename ArrayT>
int Test_int_Resize_numTuples()
{
DataArrayAPIInit("int Resize(vtkIdType numTuples)");
DataArrayAPIInit("vtkTypeBool Resize(vtkIdType numTuples)");
DataArrayAPICreateTestArray(array);
int comps = 5;
vtkIdType tuples = 0;
......
......@@ -57,8 +57,8 @@ public:
void GetTypedTuple(vtkIdType, ValueType*) const override {}
vtkIdType InsertNextValue(ValueType) override { return 0; }
void InsertValue(vtkIdType, ValueType) override {}
int Allocate(vtkIdType, vtkIdType) override { return 0; }
int Resize(vtkIdType) override { return 0; }
vtkTypeBool Allocate(vtkIdType, vtkIdType) override { return 0; }
vtkTypeBool Resize(vtkIdType) override { return 0; }
};
}
......
......@@ -134,11 +134,11 @@ int TestVariantArray(int, char*[])
vector<double> vec;
// Resizing
// * int Allocate(vtkIdType sz);
// * vtkTypeBool Allocate(vtkIdType sz);
// * void Initialize();
// * void SetNumberOfTuples(vtkIdType number);
// * void Squeeze();
// * int Resize(vtkIdType numTuples);
// * vtkTypeBool Resize(vtkIdType numTuples);
// * void SetNumberOfValues(vtkIdType number);
// * void SetVoidArray(void *arr, vtkIdType size, int save);
// * void SetArray(vtkVariant* arr, vtkIdType size, int save);
......
......@@ -86,7 +86,7 @@ public:
* If numValues is 0, all memory will be freed.
* Return 1 on success, 0 on failure.
*/
virtual int Allocate(vtkIdType numValues, vtkIdType ext=1000) = 0;
virtual vtkTypeBool Allocate(vtkIdType numValues, vtkIdType ext=1000) = 0;
/**
* Release storage and reset array to initial state.
......@@ -302,7 +302,7 @@ public:
* Requesting an array size of 0 will free all memory.
* Returns 1 if resizing succeeded and 0 otherwise.
*/
virtual int Resize(vtkIdType numTuples) = 0;
virtual vtkTypeBool Resize(vtkIdType numTuples) = 0;
//@{
/**
......
......@@ -156,7 +156,7 @@ int vtkBitArray::GetValue(vtkIdType id)
//----------------------------------------------------------------------------
// Allocate memory for this array. Delete old storage only if necessary.
int vtkBitArray::Allocate(vtkIdType sz, vtkIdType vtkNotUsed(ext))
vtkTypeBool vtkBitArray::Allocate(vtkIdType sz, vtkIdType vtkNotUsed(ext))
{
if ( sz > this->Size )
{
......@@ -310,7 +310,7 @@ unsigned char *vtkBitArray::ResizeAndExtend(vtkIdType sz)
}
//----------------------------------------------------------------------------
int vtkBitArray::Resize(vtkIdType sz)
vtkTypeBool vtkBitArray::Resize(vtkIdType sz)
{
unsigned char *newArray;
vtkIdType newSize = sz*this->NumberOfComponents;
......
......@@ -49,7 +49,7 @@ public:
* Allocate memory for this array. Delete old storage only if necessary.
* Note that ext is no longer used.
*/
int Allocate(vtkIdType sz, vtkIdType ext=1000) override;
vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext=1000) override;
/**
* Release storage and reset array to initial state.
......@@ -168,7 +168,7 @@ public:
/**
* Resize the array while conserving the data.
*/
int Resize(vtkIdType numTuples) override;
vtkTypeBool Resize(vtkIdType numTuples) override;
/**
* Get the data at a particular index.
......
......@@ -252,8 +252,8 @@ public:
int GetDataType() override;
int GetDataTypeSize() override;
bool HasStandardMemoryLayout() override;
int Allocate(vtkIdType size, vtkIdType ext = 1000) override;
int Resize(vtkIdType numTuples) override;
vtkTypeBool Allocate(vtkIdType size, vtkIdType ext = 1000) override;
vtkTypeBool Resize(vtkIdType numTuples) override;
void SetNumberOfComponents(int num) override;
void SetNumberOfTuples(vtkIdType number) override;
void Initialize() override;
......
......@@ -380,7 +380,7 @@ void vtkGenericDataArray<DerivedT, ValueTypeT>
//-----------------------------------------------------------------------------
template <class DerivedT, class ValueTypeT>
int vtkGenericDataArray<DerivedT, ValueTypeT>
vtkTypeBool vtkGenericDataArray<DerivedT, ValueTypeT>
::Allocate(vtkIdType size, vtkIdType vtkNotUsed(ext))
{
// Allocator must updated this->Size and this->MaxId properly.
......@@ -421,7 +421,7 @@ int vtkGenericDataArray<DerivedT, ValueTypeT>
//-----------------------------------------------------------------------------
template <class DerivedT, class ValueTypeT>
int vtkGenericDataArray<DerivedT, ValueTypeT>::Resize(vtkIdType numTuples)
vtkTypeBool vtkGenericDataArray<DerivedT, ValueTypeT>::Resize(vtkIdType numTuples)
{
int numComps = this->GetNumberOfComponents();
vtkIdType curNumTuples = this->Size / (numComps> 0? numComps : 1);
......
......@@ -106,8 +106,8 @@ public:
int InvokeEvent(unsigned long event, void *callData, vtkObject *self);
vtkCommand *GetCommand(unsigned long tag);
unsigned long GetTag(vtkCommand*);
int HasObserver(unsigned long event);
int HasObserver(unsigned long event, vtkCommand *cmd);
vtkTypeBool HasObserver(unsigned long event);
vtkTypeBool HasObserver(unsigned long event, vtkCommand *cmd);
void GrabFocus(vtkCommand *c1, vtkCommand *c2) {this->Focus1 = c1; this->Focus2 = c2;}
void ReleaseFocus() {this->Focus1 = nullptr; this->Focus2 = nullptr;}
void PrintSelf(ostream& os, vtkIndent indent);
......@@ -426,7 +426,7 @@ void vtkSubjectHelper::RemoveAllObservers()
}
//----------------------------------------------------------------------------
int vtkSubjectHelper::HasObserver(unsigned long event)
vtkTypeBool vtkSubjectHelper::HasObserver(unsigned long event)
{
vtkObserver *elem = this->Start;
while (elem)
......@@ -441,7 +441,7 @@ int vtkSubjectHelper::HasObserver(unsigned long event)
}
//----------------------------------------------------------------------------
int vtkSubjectHelper::HasObserver(unsigned long event, vtkCommand *cmd)
vtkTypeBool vtkSubjectHelper::HasObserver(unsigned long event, vtkCommand *cmd)
{
vtkObserver *elem = this->Start;
while (elem)
......@@ -794,7 +794,7 @@ int vtkObject::InvokeEvent(const char *event, void *callData)
}
//----------------------------------------------------------------------------
int vtkObject::HasObserver(unsigned long event)
vtkTypeBool vtkObject::HasObserver(unsigned long event)
{
if (this->SubjectHelper)
{
......@@ -804,13 +804,13 @@ int vtkObject::HasObserver(unsigned long event)
}
//----------------------------------------------------------------------------
int vtkObject::HasObserver(const char *event)
vtkTypeBool vtkObject::HasObserver(const char *event)
{
return this->HasObserver(vtkCommand::GetEventIdFromString(event));
}
//----------------------------------------------------------------------------
int vtkObject::HasObserver(unsigned long event, vtkCommand *cmd)
vtkTypeBool vtkObject::HasObserver(unsigned long event, vtkCommand *cmd)
{
if (this->SubjectHelper)
{
......@@ -820,7 +820,7 @@ int vtkObject::HasObserver(unsigned long event, vtkCommand *cmd)
}
//----------------------------------------------------------------------------
int vtkObject::HasObserver(const char *event, vtkCommand *cmd)
vtkTypeBool vtkObject::HasObserver(const char *event, vtkCommand *cmd)
{
return this->HasObserver(vtkCommand::GetEventIdFromString(event), cmd);
}
......
......@@ -147,16 +147,16 @@ public:
void RemoveObserver(vtkCommand*);
void RemoveObservers(unsigned long event, vtkCommand *);
void RemoveObservers(const char *event, vtkCommand *);
int HasObserver(unsigned long event, vtkCommand *);
int HasObserver(const char *event, vtkCommand *);
vtkTypeBool HasObserver(unsigned long event, vtkCommand *);
vtkTypeBool HasObserver(const char *event, vtkCommand *);
//@}
void RemoveObserver(unsigned long tag);
void RemoveObservers(unsigned long event);
void RemoveObservers(const char *event);
void RemoveAllObservers(); //remove every last one of them
int HasObserver(unsigned long event);
int HasObserver(const char *event);
vtkTypeBool HasObserver(unsigned long event);
vtkTypeBool HasObserver(const char *event);
//@{
/**
......
......@@ -115,7 +115,7 @@ vtkMTimeType vtkPoints::GetMTime()
return doTime;
}
int vtkPoints::Allocate(vtkIdType sz, vtkIdType ext)
vtkTypeBool vtkPoints::Allocate(vtkIdType sz, vtkIdType ext)
{
int numComp = this->Data->GetNumberOfComponents();
return this->Data->Allocate(sz * numComp, ext * numComp);
......
......@@ -44,7 +44,7 @@ public:
/**
* Allocate initial memory size. ext is no longer used.
*/
virtual int Allocate(vtkIdType sz, vtkIdType ext = 1000);
virtual vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext = 1000);
/**
* Return object to instantiated state.
......@@ -212,7 +212,7 @@ public:
* Resize the internal array while conserving the data. Returns 1 if
* resizing succeeded and 0 otherwise.
*/
int Resize(vtkIdType numPoints);
vtkTypeBool Resize(vtkIdType numPoints);
/**
* Given a list of pt ids, return an array of points.
......@@ -272,7 +272,7 @@ inline void vtkPoints::SetNumberOfPoints(vtkIdType numPoints)
this->Modified();
}
inline int vtkPoints::Resize(vtkIdType numPoints)
inline vtkTypeBool vtkPoints::Resize(vtkIdType numPoints)
{
this->Data->SetNumberOfComponents(3);
this->Modified();
......
......@@ -126,7 +126,7 @@ void vtkPoints2D::GetBounds(double bounds[4])
memcpy(bounds, this->Bounds, 4 * sizeof(double));
}
int vtkPoints2D::Allocate(vtkIdType sz, vtkIdType ext)
vtkTypeBool vtkPoints2D::Allocate(vtkIdType sz, vtkIdType ext)
{
int numComp = this->Data->GetNumberOfComponents();
return this->Data->Allocate(sz * numComp, ext * numComp);
......
......@@ -44,7 +44,7 @@ public:
/**
* Allocate initial memory size. ext is no longer used.
*/
virtual int Allocate(vtkIdType sz, vtkIdType ext = 1000);
virtual vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext = 1000);
/**
* Return object to instantiated state.
......@@ -182,7 +182,7 @@ public:
* Resize the internal array while conserving the data. Returns 1 if
* resizing succeeded and 0 otherwise.
*/
int Resize(vtkIdType numPoints);
vtkTypeBool Resize(vtkIdType numPoints);
/**
* Given a list of pt ids, return an array of points.
......@@ -230,7 +230,7 @@ inline void vtkPoints2D::SetNumberOfPoints(vtkIdType numPoints)
this->Modified();
}
inline int vtkPoints2D::Resize(vtkIdType numPoints)
inline vtkTypeBool vtkPoints2D::Resize(vtkIdType numPoints)
{
this->Data->SetNumberOfComponents(2);
this->Modified();
......
......@@ -165,7 +165,7 @@ void vtkStringArray::SetArrayFreeFunction(void (*callback)(void *))
//-----------------------------------------------------------------------------
// Allocate memory for this array. Delete old storage only if necessary.
int vtkStringArray::Allocate(vtkIdType sz, vtkIdType)
vtkTypeBool vtkStringArray::Allocate(vtkIdType sz, vtkIdType)
{
if(sz > this->Size)
{
......@@ -404,7 +404,7 @@ vtkStdString * vtkStringArray::ResizeAndExtend(vtkIdType sz)
}
//-----------------------------------------------------------------------------
int vtkStringArray::Resize(vtkIdType sz)
vtkTypeBool vtkStringArray::Resize(vtkIdType sz)
{
vtkStdString * newArray;
vtkIdType newSize = sz;
......
......@@ -84,7 +84,7 @@ public:
/**
* Resize the array while conserving the data.
*/
int Resize(vtkIdType numTuples) override;
vtkTypeBool Resize(vtkIdType numTuples) override;
/**
* Set the tuple at the ith location using the jth tuple in the source array.
......@@ -166,7 +166,7 @@ public:
* Allocate memory for this array. Delete old storage only if necessary.
* Note that ext is no longer used.
*/
int Allocate( vtkIdType sz, vtkIdType ext=1000 ) override;
vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext=1000 ) override;
/**
* Get the data at a particular index.
......
......@@ -158,8 +158,8 @@ public:
// Reintroduced as pure virtual since the base vtkGenericDataArray method
// requires new allocation/resize APIs, though existing MappedDataArrays
// would just use the vtkDataArray-level virtuals.
int Allocate(vtkIdType size, vtkIdType ext = 1000) override = 0;
int Resize(vtkIdType numTuples) override = 0;
vtkTypeBool Allocate(vtkIdType size, vtkIdType ext = 1000) override = 0;
vtkTypeBool Resize(vtkIdType numTuples) override = 0;
protected:
vtkTypedDataArray();
......
......@@ -47,7 +47,7 @@ void vtkUnicodeStringArray::PrintSelf(ostream& os, vtkIndent indent)
this->Superclass::PrintSelf(os,indent);
}
int vtkUnicodeStringArray::Allocate(vtkIdType sz, vtkIdType)
vtkTypeBool vtkUnicodeStringArray::Allocate(vtkIdType sz, vtkIdType)
{
this->Internal->Storage.reserve(sz);
this->DataChanged();
......@@ -295,7 +295,7 @@ void vtkUnicodeStringArray::Squeeze()
this->DataChanged();
}
int vtkUnicodeStringArray::Resize(vtkIdType numTuples)
vtkTypeBool vtkUnicodeStringArray::Resize(vtkIdType numTuples)
{
this->Internal->Storage.resize(numTuples);
this->DataChanged();
......
......@@ -44,7 +44,7 @@ public:
vtkTypeMacro(vtkUnicodeStringArray,vtkAbstractArray);
void PrintSelf(ostream& os, vtkIndent indent) override;
int Allocate(vtkIdType sz, vtkIdType ext=1000) override;
vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext=1000) override;
void Initialize() override;
int GetDataType() override;
int GetDataTypeSize() override;
......@@ -67,7 +67,7 @@ public:
vtkIdType id1, vtkAbstractArray* source1,
vtkIdType id2, vtkAbstractArray* source2, double t) override;
void Squeeze() override;
int Resize(vtkIdType numTuples) override;
vtkTypeBool Resize(vtkIdType numTuples) override;
void SetVoidArray(void *array, vtkIdType size, int save) override;
void SetVoidArray(void *array, vtkIdType size, int save,
int deleteMethod) override;
......
......@@ -122,7 +122,7 @@ vtkVariantArray::~vtkVariantArray()
//
//----------------------------------------------------------------------------
int vtkVariantArray::Allocate(vtkIdType sz, vtkIdType)
vtkTypeBool vtkVariantArray::Allocate(vtkIdType sz, vtkIdType)
{
if(sz > this->Size)
{
......@@ -537,7 +537,7 @@ void vtkVariantArray::Squeeze()
}
//----------------------------------------------------------------------------
int vtkVariantArray::Resize(vtkIdType sz)
vtkTypeBool vtkVariantArray::Resize(vtkIdType sz)
{
vtkVariant* newArray;
vtkIdType newSize = sz * this->GetNumberOfComponents();
......
......@@ -67,7 +67,7 @@ public:
* Allocate memory for this array. Delete old storage only if necessary.
* Note that ext is no longer used.
*/
int Allocate(vtkIdType sz, vtkIdType ext=1000) override;
vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext=1000) override;
/**
* Release storage and reset array to initial state.
......@@ -187,7 +187,7 @@ public:
* Resize the array while conserving the data. Returns 1 if
* resizing succeeded and 0 otherwise.
*/
int Resize(vtkIdType numTuples) override;
vtkTypeBool Resize(vtkIdType numTuples) override;
//@{
/**
......
......@@ -31,7 +31,7 @@ vtkVoidArray::~vtkVoidArray()
}
// Allocate memory for this array. Delete old storage only if necessary.
int vtkVoidArray::Allocate(vtkIdType sz, vtkIdType vtkNotUsed(ext))
vtkTypeBool vtkVoidArray::Allocate(vtkIdType sz, vtkIdType vtkNotUsed(ext))
{
if ( sz > this->Size || this->Array != nullptr )
{
......
......@@ -42,7 +42,7 @@ public:
* Allocate memory for this array. Delete old storage only if necessary.
* Note that the parameter ext is no longer used.
*/
int Allocate(vtkIdType sz, vtkIdType ext=1000);
vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext=1000);
/**
* Release storage and reset array to initial state.
......
......@@ -189,8 +189,8 @@ public:
/**
* Returns 1 if the point is contained in the box else 0.
*/
int ContainsPoint(double p[3]) const;
int ContainsPoint(double px, double py, double pz) const;
vtkTypeBool ContainsPoint(double p[3]) const;
vtkTypeBool ContainsPoint(double px, double py, double pz) const;
//@}
/**
......@@ -452,7 +452,7 @@ inline void vtkBoundingBox::GetMaxPoint(double &x, double &y, double &z) const
z = this->MaxPnt[2];
}
inline int vtkBoundingBox::ContainsPoint(double px, double py,
inline vtkTypeBool vtkBoundingBox::ContainsPoint(double px, double py,
double pz) const
{
if ((px < this->MinPnt[0]) || (px > this->MaxPnt[0]))
......@@ -470,7 +470,7 @@ inline int vtkBoundingBox::ContainsPoint(double px, double py,
return 1;
}
inline int vtkBoundingBox::ContainsPoint(double p[3]) const
inline vtkTypeBool vtkBoundingBox::ContainsPoint(double p[3]) const
{
return this->ContainsPoint(p[0], p[1], p[2]);
}
......
......@@ -511,7 +511,7 @@ int vtkBox::IntersectWithLine(const double bounds[6],
}
//----------------------------------------------------------------------------
int vtkBox::
vtkTypeBool vtkBox::
IntersectWithPlane(double bounds[6], double origin[3], double normal[3])
{
// Evaluate the eight points. If there is a sign change, then there is an
......@@ -568,7 +568,7 @@ namespace {
// number of intersections ranges from [3,6]. The memory layout for xout[18]
// is consistent with the vtkPoints array and is organized as (xyz, xyz, xyz,
// xyz, xyz, xyz).
int vtkBox::
vtkTypeBool vtkBox::
IntersectWithPlane(double bounds[6], double origin[3], double normal[3],
double xout[18])
{
......
......@@ -127,7 +127,7 @@ public:
* The function returns non-zero if the plane and box intersect; zero
* otherwise.
*/
static int IntersectWithPlane(double bounds[6], double origin[3],
static vtkTypeBool IntersectWithPlane(double bounds[6], double origin[3],
double normal[3]);
/**
......@@ -141,7 +141,7 @@ public:
* vtkPoints array layout and is organized as (xyz, xyz, xyz, xyz, xyz,
* xyz).
*/
static int IntersectWithPlane(double bounds[6], double origin[3],
static vtkTypeBool IntersectWithPlane(double bounds[6], double origin[3],
double normal[3], double xints[18]);
protected:
......
......@@ -55,7 +55,7 @@ public:
/**
* Allocate memory and set the size to extend by.
*/
int Allocate(vtkIdType sz, vtkIdType ext=1000)
vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext=1000)
{return this->Ia->Allocate(sz,ext);}
/**
......
......@@ -240,7 +240,7 @@ void vtkFieldData::Initialize()
//----------------------------------------------------------------------------
// Allocate data for each array.
int vtkFieldData::Allocate(vtkIdType sz, vtkIdType ext)
vtkTypeBool vtkFieldData::Allocate(vtkIdType sz, vtkIdType ext)
{
int i;
int status = 0;
......
......@@ -68,7 +68,7 @@ public:
* Allocate data for each array.
* Note that ext is no longer used.
*/
int Allocate(vtkIdType sz, vtkIdType ext=1000);
vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext=1000);
/**
* Copy data array structure from a given field. The same arrays
......
......@@ -147,7 +147,7 @@ int vtkGenericAdaptorCell::GetHighestOrderAttribute(vtkGenericAttributeCollectio
// Does the attribute `a' have no higher-order interpolation for the cell?
// \pre a_exists: a!=0
// \post definition: result==(GetAttributeOrder()==1)
int vtkGenericAdaptorCell::IsAttributeLinear(vtkGenericAttribute *a)
vtkTypeBool vtkGenericAdaptorCell::IsAttributeLinear(vtkGenericAttribute *a)
{
return this->GetAttributeOrder(a) == 1;
}
......
......@@ -153,7 +153,7 @@ public:
* \pre a_exists: a!=0
* \post definition: result==(GetAttributeOrder()==1)
*/
int IsAttributeLinear(vtkGenericAttribute *a);
vtkTypeBool IsAttributeLinear(vtkGenericAttribute *a);
/**
* Is the cell primary (i.e. not composite) ?
......
......@@ -57,7 +57,7 @@ public:
/**
* Is the iterator at the end of traversal?
*/
virtual int IsAtEnd() = 0;
virtual vtkTypeBool IsAtEnd() = 0;
/**
* Create an empty cell. The user is responsible for deleting it.
......
......@@ -55,7 +55,7 @@ public:
/**
* Is the iterator at the end of traversal?
*/
virtual int IsAtEnd() = 0;
virtual vtkTypeBool IsAtEnd() = 0;
/**
* Move the iterator to the next position in the list.
......
......@@ -76,7 +76,7 @@ public:
/**
* Test if the end of the extent has been reached
*/
int IsAtEnd()
vtkTypeBool IsAtEnd()
{
return (this->Pointer >= this->EndPointer);
}
......
......@@ -155,13 +155,13 @@ public:
* A point is in a node if and only if MinBounds[i] < p[i] <= MaxBounds[i],
* which allows a node to be divided into eight non-overlapping children.
*/
int ContainsPoint( const double pnt[3] );
vtkTypeBool ContainsPoint( const double pnt[3] );
/**
* A point is in a node, in terms of data, if and only if MinDataBounds[i]
* <= p[i] <= MaxDataBounds[i].
*/
int ContainsPointByData( const double pnt[3] );
vtkTypeBool ContainsPointByData( const double pnt[3] );
/**
* This function is called after a successful point-insertion check and
......@@ -392,7 +392,7 @@ inline int vtkIncrementalOctreeNode::GetChildIndex( const double point[3] )
}
// In-lined for performance
inline int vtkIncrementalOctreeNode::ContainsPoint( const double pnt[3] )
inline vtkTypeBool vtkIncrementalOctreeNode::ContainsPoint( const double pnt[3] )
{
return (
( this->MinBounds[0] < pnt[0] && pnt[0] <= this->MaxBounds[0] &&
......@@ -403,7 +403,7 @@ inline int vtkIncrementalOctreeNode::ContainsPoint( const double pnt[3] )
}
// In-lined for performance
inline int vtkIncrementalOctreeNode::ContainsPointByData( const double pnt[3] )
inline vtkTypeBool vtkIncrementalOctreeNode::ContainsPointByData( const double pnt[3] )
{
return