Commit e0d93256 authored by Sean McBride's avatar Sean McBride

Manually changed some methods that start with IsA to use vtkTypeBool

Confusingly, IsArrayAnAttribute() must stay as int.
parent 85b00f75
......@@ -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) ?
......
......@@ -730,7 +730,7 @@ inline OTTetra::TetraClassification OTTetra::DetermineType()
//------------------------------------------------------------------------
// Determine whether the point is used by a specified tetra.
inline static int IsAPoint(OTTetra *t, vtkIdType id)
inline static vtkTypeBool IsAPoint(OTTetra *t, vtkIdType id)
{
if ( id == t->Points[0]->InsertionId || id == t->Points[1]->InsertionId ||
id == t->Points[2]->InsertionId || id == t->Points[3]->InsertionId )
......
......@@ -483,7 +483,7 @@ public:
}
// Return true if (e1, e2) is an edge of the tri:
int IsAnEdge(vtkIdType e1, vtkIdType e2)
vtkTypeBool IsAnEdge(vtkIdType e1, vtkIdType e2)
{
int sum = 0;
for(int i=0; i<3; i++)
......@@ -718,7 +718,7 @@ public:
vtkIdType GetPointId( int i ) { return this->PointId[i]; }
// Return true if (e1, e2) is an edge of the tetra:
int IsAnEdge(vtkIdType e1, vtkIdType e2)
vtkTypeBool IsAnEdge(vtkIdType e1, vtkIdType e2)
{
int sum = 0;
for(int i=0; i<4; i++)
......
......@@ -111,7 +111,7 @@ public:
* Returns 1 if the solver uses adaptive stepsize control,
* 0 otherwise
*/
virtual int IsAdaptive() { return this->Adaptive; }
virtual vtkTypeBool IsAdaptive() { return this->Adaptive; }
enum ErrorCodes
{
......@@ -131,7 +131,7 @@ protected:
double* Vals;
double* Derivs;
int Initialized;
int Adaptive;
vtkTypeBool Adaptive;
private:
vtkInitialValueProblemSolver(const vtkInitialValueProblemSolver&) = delete;
......
......@@ -358,7 +358,7 @@ void vtkAngleWidget::SetEnabled(int enabling)
}
//----------------------------------------------------------------------
int vtkAngleWidget::IsAngleValid()
vtkTypeBool vtkAngleWidget::IsAngleValid()
{
if ( this->WidgetState == vtkAngleWidget::Manipulate ||
(this->WidgetState == vtkAngleWidget::Define && this->CurrentHandle == 2) )
......
......@@ -125,7 +125,7 @@ public:
* A flag indicates whether the angle is valid. The angle value only becomes
* valid after two of the three points are placed.
*/
int IsAngleValid();
vtkTypeBool IsAngleValid();
/**
* Methods to change the whether the widget responds to interaction.
......
......@@ -78,14 +78,14 @@ public:
* Is this a ray cast mapper? A subclass would return 1 if the
* ray caster is needed to generate an image from this mapper.
*/
virtual int IsARayCastMapper()
virtual vtkTypeBool IsARayCastMapper()
{ return 0; }
/**
* Is this a "render into image" mapper? A subclass would return 1 if the
* mapper produces an image by rendering into a software image buffer.
*/
virtual int IsARenderIntoImageMapper()
virtual vtkTypeBool IsARenderIntoImageMapper()
{ return 0; }
/**
......
......@@ -578,7 +578,7 @@ public:
* automatically created by the renderer. It returns 0 if the
* ActiveCamera does not yet exist.
*/
int IsActiveCameraCreated()
vtkTypeBool IsActiveCameraCreated()
{ return (this->ActiveCamera != nullptr); }
......
......@@ -617,7 +617,7 @@ void vtkParallelRenderManager::StartRender()
}
}
int hasActiveCamera=ren->IsActiveCameraCreated();
vtkTypeBool hasActiveCamera=ren->IsActiveCameraCreated();
vtkCamera *cam = ren->GetActiveCamera();
if(!hasActiveCamera)
{
......
......@@ -202,7 +202,7 @@ int vtkBridgeCell::GetAttributeOrder(vtkGenericAttribute *vtkNotUsed(a))
// Does the attribute `a' have no higher-order interpolation for the cell?
// \pre a_exists: a!=0
// \post definition: result==(GetAttributeOrder()==1)
int vtkBridgeCell::IsAttributeLinear(vtkGenericAttribute *a)
vtkTypeBool vtkBridgeCell::IsAttributeLinear(vtkGenericAttribute *a)
{
(void)a; // The attribute order is the order of the geometry.
int result=this->IsGeometryLinear();
......
......@@ -88,7 +88,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) ?
......
......@@ -179,7 +179,7 @@ PREDEFINED = "vtkSetMacro(name,type)= \
virtual const char* GetClassNameInternal() const; \
public: \
static int IsTypeOf(const char *type); \
virtual int IsA(const char *type); \
virtual vtkTypeBool IsA(const char *type); \
static thisClass* SafeDownCast(vtkObjectBase *o); \
protected: \
virtual vtkObjectBase *NewInstanceInternal() const; \
......
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