Commit c2a83d7f authored by Lisa Avila's avatar Lisa Avila
Browse files

ERR: Changed casts to safe downcasts to remove warnings on HP

parent 7538a73d
......@@ -41,7 +41,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=========================================================================*/
#include "vtkCollection.h"
#include "vtkActor2D.h"
#include "vtkActor2DCollection.h"
#include "vtkObjectFactory.h"
......
......@@ -53,7 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define __vtkActor2DCollection_h
#include "vtkPropCollection.h"
class vtkActor2D;
#include "vtkActor2D.h"
class vtkViewport;
class VTK_EXPORT vtkActor2DCollection : public vtkPropCollection
......@@ -118,7 +118,7 @@ inline int vtkActor2DCollection::IsItemPresent(vtkActor2D *a)
inline vtkActor2D *vtkActor2DCollection::GetNextActor2D()
{
return (vtkActor2D *)(this->GetNextItemAsObject());
return vtkActor2D::SafeDownCast(this->GetNextItemAsObject());
}
inline vtkActor2D *vtkActor2DCollection::GetLastActor2D()
......@@ -129,7 +129,7 @@ inline vtkActor2D *vtkActor2DCollection::GetLastActor2D()
}
else
{
return (vtkActor2D *)(this->Bottom->Item);
return vtkActor2D::SafeDownCast(this->Bottom->Item);
}
}
......
......@@ -64,12 +64,12 @@ public:
// Description:
// Get the next data object in the list.
vtkDataObject *GetNextItem() {
return (vtkDataObject *)(this->GetNextItemAsObject());};
return vtkDataObject::SafeDownCast(this->GetNextItemAsObject());};
// Description:
// Get the ith data object in the list.
vtkDataObject *GetItem(int i) {
return (vtkDataObject *)(this->GetItemAsObject(i));};
return vtkDataObject::SafeDownCast(this->GetItemAsObject(i));};
protected:
vtkDataObjectCollection() {};
......
......@@ -64,12 +64,12 @@ public:
// Description:
// Get the next dataset in the list.
vtkDataSet *GetNextItem() {
return (vtkDataSet *)(this->GetNextItemAsObject());};
return vtkDataSet::SafeDownCast(this->GetNextItemAsObject());};
// Description:
// Get the ith dataset in the list.
vtkDataSet *GetItem(int i) {
return (vtkDataSet *)(this->GetItemAsObject(i));};
return vtkDataSet::SafeDownCast(this->GetItemAsObject(i));};
protected:
vtkDataSetCollection() {};
......
......@@ -86,7 +86,7 @@ inline void vtkImplicitFunctionCollection::AddItem(vtkImplicitFunction *f)
inline vtkImplicitFunction *vtkImplicitFunctionCollection::GetNextItem()
{
return (vtkImplicitFunction *)(this->GetNextItemAsObject());
return vtkImplicitFunction::SafeDownCast(this->GetNextItemAsObject());
}
#endif
......@@ -73,7 +73,7 @@ return new vtkObjectFactoryCollection;};
// Description:
// Get the next ObjectFactory in the list. Return NULL when the end of the
// list is reached.
vtkObjectFactory *GetNextItem() { return (vtkObjectFactory *)(this->GetNextItemAsObject());}
vtkObjectFactory *GetNextItem() { return vtkObjectFactory::SafeDownCast(this->GetNextItemAsObject());}
protected:
vtkObjectFactoryCollection() {};
......
......@@ -86,7 +86,7 @@ inline void vtkPlaneCollection::AddItem(vtkPlane *f)
inline vtkPlane *vtkPlaneCollection::GetNextItem()
{
return (vtkPlane *)(this->GetNextItemAsObject());
return vtkPlane::SafeDownCast(this->GetNextItemAsObject());
}
#endif
......@@ -41,7 +41,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=========================================================================*/
#include "vtkPropCollection.h"
#include "vtkObjectFactory.h"
#include "vtkProp.h"
//------------------------------------------------------------------------------
......
......@@ -52,7 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define __vtkPropC_h
#include "vtkCollection.h"
class vtkProp;
#include "vtkProp.h"
class VTK_EXPORT vtkPropCollection : public vtkCollection
{
......@@ -99,7 +99,7 @@ inline void vtkPropCollection::AddItem(vtkProp *a)
inline vtkProp *vtkPropCollection::GetNextProp()
{
return (vtkProp *)(this->GetNextItemAsObject());
return vtkProp::SafeDownCast(this->GetNextItemAsObject());
}
inline vtkProp *vtkPropCollection::GetLastProp()
......@@ -110,7 +110,7 @@ inline vtkProp *vtkPropCollection::GetLastProp()
}
else
{
return (vtkProp *)(this->Bottom->Item);
return vtkProp::SafeDownCast(this->Bottom->Item);
}
}
......
......@@ -89,7 +89,7 @@ inline void vtkTransformCollection::AddItem(vtkTransform *t)
inline vtkTransform *vtkTransformCollection::GetNextItem()
{
return (vtkTransform *)(this->GetNextItemAsObject());
return vtkTransform::SafeDownCast(this->GetNextItemAsObject());
}
#endif
......@@ -40,7 +40,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=========================================================================*/
#include "vtkActorCollection.h"
#include "vtkActor.h"
#include "vtkObjectFactory.h"
......
......@@ -52,7 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define __vtkActorC_h
#include "vtkPropCollection.h"
class vtkActor;
#include "vtkActor.h"
class vtkProperty;
class VTK_EXPORT vtkActorCollection : public vtkPropCollection
......@@ -105,7 +105,7 @@ inline void vtkActorCollection::AddItem(vtkActor *a)
inline vtkActor *vtkActorCollection::GetNextActor()
{
return (vtkActor *)(this->GetNextItemAsObject());
return vtkActor::SafeDownCast(this->GetNextItemAsObject());
}
inline vtkActor *vtkActorCollection::GetLastActor()
......@@ -116,7 +116,7 @@ inline vtkActor *vtkActorCollection::GetLastActor()
}
else
{
return (vtkActor *)(this->Bottom->Item);
return vtkActor::SafeDownCast(this->Bottom->Item);
}
}
......
......@@ -52,7 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define __vtkCullerC_h
#include "vtkCollection.h"
class vtkCuller;
#include "vtkCuller.h"
class VTK_EXPORT vtkCullerCollection : public vtkCollection
{
......@@ -68,7 +68,7 @@ class VTK_EXPORT vtkCullerCollection : public vtkCollection
// Description:
// Get the next Culler in the list.
vtkCuller *GetNextItem() {
return (vtkCuller *)(this->GetNextItemAsObject());};
return vtkCuller::SafeDownCast(this->GetNextItemAsObject());};
// Description:
// Get the last Culler in the list.
......@@ -96,7 +96,7 @@ inline vtkCuller *vtkCullerCollection::GetLastItem()
}
else
{
return (vtkCuller *)(this->Bottom->Item);
return vtkCuller::SafeDownCast(this->Bottom->Item);
}
}
......
......@@ -73,7 +73,7 @@ void vtkLightCollection::AddItem(vtkLight *a)
// exhausted.
vtkLight *vtkLightCollection::GetNextItem()
{
return (vtkLight *)(this->GetNextItemAsObject());
return vtkLight::SafeDownCast(this->GetNextItemAsObject());
}
......
......@@ -52,7 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define __vtkMapperC_h
#include "vtkCollection.h"
class vtkMapper;
#include "vtkMapper.h"
class VTK_EXPORT vtkMapperCollection : public vtkCollection
{
......@@ -68,7 +68,7 @@ class VTK_EXPORT vtkMapperCollection : public vtkCollection
// Description:
// Get the next mapper in the list.
vtkMapper *GetNextItem() {
return (vtkMapper *)(this->GetNextItemAsObject());};
return vtkMapper::SafeDownCast(this->GetNextItemAsObject());};
// Description:
// Get the last mapper in the list.
......@@ -95,7 +95,7 @@ inline vtkMapper *vtkMapperCollection::GetLastItem()
}
else
{
return (vtkMapper *)(this->Bottom->Item);
return vtkMapper::SafeDownCast(this->Bottom->Item);
}
}
......
......@@ -67,7 +67,7 @@ public:
// Description:
// Get the next poly data in the list.
vtkPolyData *GetNextItem() {
return (vtkPolyData *)(this->GetNextItemAsObject());};
return vtkPolyData::SafeDownCast(this->GetNextItemAsObject());};
protected:
vtkPolyDataCollection() {};
~vtkPolyDataCollection() {};
......
......@@ -52,7 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define __vtkProp3DCollection_h
#include "vtkPropCollection.h"
class vtkProp3D;
#include "vtkProp3D.h"
class VTK_EXPORT vtkProp3DCollection : public vtkPropCollection
{
......@@ -93,7 +93,7 @@ inline void vtkProp3DCollection::AddItem(vtkProp3D *a)
inline vtkProp3D *vtkProp3DCollection::GetNextProp3D()
{
return (vtkProp3D *)(this->GetNextItemAsObject());
return vtkProp3D::SafeDownCast(this->GetNextItemAsObject());
}
inline vtkProp3D *vtkProp3DCollection::GetLastProp3D()
......@@ -104,7 +104,7 @@ inline vtkProp3D *vtkProp3DCollection::GetLastProp3D()
}
else
{
return (vtkProp3D *)(this->Bottom->Item);
return vtkProp3D::SafeDownCast(this->Bottom->Item);
}
}
......
......@@ -69,7 +69,7 @@ class VTK_EXPORT vtkRenderWindowCollection : public vtkCollection
// Get the next RenderWindow in the list. Return NULL when at the end of the
// list.
vtkRenderWindow *GetNextItem() {
return (vtkRenderWindow *)(this->GetNextItemAsObject());};
return vtkRenderWindow::SafeDownCast(this->GetNextItemAsObject());};
protected:
vtkRenderWindowCollection() {};
......
......@@ -69,7 +69,7 @@ class VTK_EXPORT vtkRendererCollection : public vtkCollection
// Get the next Renderer in the list. Return NULL when at the end of the
// list.
vtkRenderer *GetNextItem() {
return (vtkRenderer *)(this->GetNextItemAsObject());};
return vtkRenderer::SafeDownCast(this->GetNextItemAsObject());};
// Description:
// Forward the Render() method to each renderer in the list.
......
......@@ -66,7 +66,7 @@ public:
// Get the next item in the collection. NULL is returned if the collection
// is exhausted.
vtkStructuredPoints *GetNextItem() {
return (vtkStructuredPoints *)(this->GetNextItemAsObject());};
return vtkStructuredPoints::SafeDownCast(this->GetNextItemAsObject());};
protected:
vtkStructuredPointsCollection() {};
......
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