Commit c03fe55a authored by Mathieu Malaterre's avatar Mathieu Malaterre

FIX: Some warnings to make borland happier

parent 5b770c56
......@@ -265,19 +265,19 @@ int TestORG(ostream& strm)
rg3D->GetCell(k * (19 * 19) + j * 19 + i, gcell3D);
strm << "gcell3D: " << *gcell3D ;
i = 10; j = 15; k = 7;
i = 10; j = 15;
rg2Dxy->GetCell(j * 19 + i,gcell2D);
strm << "gcell2D: " << *gcell2D ;
i = 10; j = 15; k = 7;
i = 10; j = 15;
rg2Dxz->GetCell(j * 19 + i,gcell2D);
strm << "gcell2D: " << *gcell2D ;
i = 10; j = 15; k = 7;
i = 10; j = 15;
rg2Dxz->GetCell(j * 19 + i,gcell2D);
strm << "gcell2D: " << *gcell2D ;
i = 10; j = 15; k = 7;
i = 10; j = 15;
rg2Dyz->GetCell(j * 19 + i,gcell2D);
strm << "gcell2D: " << *gcell2D ;
......
......@@ -305,15 +305,15 @@ int TestOSG(ostream& strm)
sg3D->GetCell(k * (19 * 19) + j * 19 + i, gcell3D);
strm << "gcell3D: " << *gcell3D ;
i = 10; j = 15; k = 7;
i = 10; j = 15;
sg2Dxy->GetCell(j * 19 + i,gcell2D);
strm << "gcell2D: " << *gcell2D ;
i = 10; j = 15; k = 7;
i = 10; j = 15;
sg2Dxz->GetCell(j * 19 + i,gcell2D);
strm << "gcell2D: " << *gcell2D ;
i = 10; j = 15; k = 7;
i = 10; j = 15;
sg2Dyz->GetCell(j * 19 + i,gcell2D);
strm << "gcell2D: " << *gcell2D ;
......
......@@ -109,7 +109,7 @@ int main( int argc, char *argv[] )
vtkPolyDataMapper *mapper;
vtkCellArray *cells;
vtkActor *actor;
vtkGlyph3D *filter = NULL;
vtkGlyph3D *filter;
vtkPolyData *data;
vtkPoints *pnts = 0;
vtkTriangleFilter *tfilter;
......
......@@ -23,7 +23,7 @@
#include "vtkViewport.h"
#include "vtkWindow.h"
vtkCxxRevisionMacro(vtkAxisActor2D, "1.40");
vtkCxxRevisionMacro(vtkAxisActor2D, "1.41");
vtkStandardNewMacro(vtkAxisActor2D);
vtkCxxSetObjectMacro(vtkAxisActor2D,LabelTextProperty,vtkTextProperty);
......@@ -681,7 +681,7 @@ int vtkAxisActor2DComputeTicks(double sRange[2], double &interval,
double &root)
{
// first we try assuming the first value is reasonable
int numTicks = 0;
int numTicks;
double range = fabs(sRange[1]-sRange[0]);
int rootPower = static_cast<int>(floor(log10(range)-1));
root = pow(10.0,rootPower);
......
......@@ -38,7 +38,7 @@
#define VTK_FTFC_DEBUG_CD 0
//----------------------------------------------------------------------------
vtkCxxRevisionMacro(vtkFreeTypeUtilities, "1.5");
vtkCxxRevisionMacro(vtkFreeTypeUtilities, "1.6");
vtkInstantiatorNewMacro(vtkFreeTypeUtilities);
//----------------------------------------------------------------------------
......@@ -263,7 +263,6 @@ void vtkFreeTypeUtilities::MapTextPropertyToId(vtkTextProperty *tprop,
// - 1/10th degree: 12 bits (11.8)
int angle = (vtkMath::Round(tprop->GetOrientation() * 10.0) % 3600) << bits;
bits += 12;
// We really should not use more than 32 bits
......@@ -310,7 +309,6 @@ void vtkFreeTypeUtilities::MapIdToTextProperty(unsigned long id,
// - 1/10th degree: 12 bits (11.8)
int angle = id >> bits;
bits += 12;
tprop->SetOrientation((float)(angle & ((1 << 12) - 1)) / 10.0);
// We really should not use more than 32 bits
......
......@@ -20,7 +20,7 @@
#include "vtkProp.h"
#include "vtkRenderer.h"
vtkCxxRevisionMacro(vtkFrustumCoverageCuller, "1.32");
vtkCxxRevisionMacro(vtkFrustumCoverageCuller, "1.33");
vtkStandardNewMacro(vtkFrustumCoverageCuller);
// Create a frustum coverage culler with default values
......@@ -106,7 +106,6 @@ double vtkFrustumCoverageCuller::Cull( vtkRenderer *ren,
if (!vtkMath::AreBoundsInitialized(bounds))
{
coverage = 0.0;
i = 7;
}
else
{
......
......@@ -34,7 +34,7 @@
#include "vtkTransform.h"
#include "vtkUnsignedCharArray.h"
vtkCxxRevisionMacro(vtkIVExporter, "1.60");
vtkCxxRevisionMacro(vtkIVExporter, "1.61");
vtkStandardNewMacro(vtkIVExporter);
vtkIVExporter::vtkIVExporter()
......@@ -244,7 +244,7 @@ void vtkIVExporter::WriteAnActor(vtkActor *anActor, FILE *fp)
vtkPolyData *pd;
vtkGeometryFilter *gf = NULL;
vtkPointData *pntData;
vtkPoints *points = NULL;
vtkPoints *points;
vtkDataArray *normals = NULL;
vtkDataArray *tcoords = NULL;
int i;
......
......@@ -26,7 +26,7 @@
#include <math.h>
vtkCxxRevisionMacro(vtkLODProp3D, "1.42");
vtkCxxRevisionMacro(vtkLODProp3D, "1.43");
vtkStandardNewMacro(vtkLODProp3D);
#define VTK_INDEX_NOT_IN_USE -1
......@@ -1026,7 +1026,7 @@ void vtkLODProp3D::PrintSelf(ostream& os, vtkIndent indent)
void vtkLODProp3D::GetActors(vtkPropCollection *ac)
{
vtkDebugMacro(<< "vtkLODProp3D::GetActors");
int index = 0;
int index;
int lodID;
lodID = this->GetPickLODID();
......@@ -1043,12 +1043,12 @@ void vtkLODProp3D::GetActors(vtkPropCollection *ac)
}
}
int vtkLODProp3D::GetAutomaticPickPropIndex(void)
int vtkLODProp3D::GetAutomaticPickPropIndex()
{
double bestTime = -1.0;
int index = 0;
double targetTime = 0;
double estimatedTime = 0.0;
double estimatedTime;
for (int i = 0; i < this->NumberOfEntries; i++ )
{
......@@ -1062,7 +1062,6 @@ int vtkLODProp3D::GetAutomaticPickPropIndex(void)
if ( estimatedTime == 0.0 )
{
index = i;
bestTime = 0.0;
break;
}
......@@ -1095,10 +1094,10 @@ int vtkLODProp3D::GetAutomaticPickPropIndex(void)
int vtkLODProp3D::GetPickLODID(void)
{
int lodID=0;
int lodID;
vtkDebugMacro(<< "vtkLODProp3D::GetPickLODID");
int index = 0;
int index;
if (this->AutomaticPickLODSelection)
{
if ( this->SelectedLODIndex < 0 ||
......
......@@ -30,7 +30,7 @@
#include "vtkRendererCollection.h"
#include "vtkTransform.h"
vtkCxxRevisionMacro(vtkOBJExporter, "1.55");
vtkCxxRevisionMacro(vtkOBJExporter, "1.56");
vtkStandardNewMacro(vtkOBJExporter);
vtkOBJExporter::vtkOBJExporter()
......@@ -124,9 +124,9 @@ void vtkOBJExporter::WriteAnActor(vtkActor *anActor, FILE *fpObj, FILE *fpMtl,
vtkPolyData *pd;
vtkGeometryFilter *gf = NULL;
vtkPointData *pntData;
vtkPoints *points = NULL;
vtkPoints *points;
vtkDataArray *normals = NULL;
vtkDataArray *tcoords = NULL;
vtkDataArray *tcoords;
int i, i1, i2, idNext;
vtkProperty *prop;
double *tempd;
......
......@@ -36,7 +36,7 @@
#include "vtkTriangleStrip.h"
#include "vtkVersion.h"
vtkCxxRevisionMacro(vtkOOGLExporter, "1.30");
vtkCxxRevisionMacro(vtkOOGLExporter, "1.31");
vtkStandardNewMacro(vtkOOGLExporter);
vtkOOGLExporter::vtkOOGLExporter()
......@@ -272,7 +272,7 @@ void vtkOOGLExporter::WriteAnActor(vtkActor *anActor, FILE *fp, int count)
vtkDataSet *ds;
vtkPolyData *pd;
vtkGeometryFilter *gf = NULL;
vtkPoints *points = NULL;
vtkPoints *points;
int i;
vtkProperty *prop;
static double defcolor[3] = { 1.0, 1.0, 1.0 };
......
......@@ -31,7 +31,7 @@
#include <limits.h>
#ifndef VTK_IMPLEMENT_MESA_CXX
vtkCxxRevisionMacro(vtkOpenGLImageMapper, "1.57");
vtkCxxRevisionMacro(vtkOpenGLImageMapper, "1.58");
vtkStandardNewMacro(vtkOpenGLImageMapper);
#endif
......@@ -126,7 +126,7 @@ void vtkOpenGLImageMapperRender(vtkOpenGLImageMapper *self, vtkImageData *data,
T *inPtr = (T *)dataPtr;
T *inPtr1 = inPtr;
int i = width;
int i;
int j = height;
unsigned char *newPtr;
......@@ -273,7 +273,7 @@ void vtkOpenGLImageMapperRenderShort(vtkOpenGLImageMapper *self, vtkImageData *d
T *inPtr = (T *)dataPtr;
T *inPtr1 = inPtr;
int i = width;
int i;
int j = height;
unsigned char *newPtr;
......@@ -421,7 +421,7 @@ void vtkOpenGLImageMapperRenderChar(vtkOpenGLImageMapper *self, vtkImageData *da
T *inPtr1 = inPtr;
unsigned char tmp;
int i = width;
int i;
int j = height;
unsigned char *newPtr;
......
......@@ -45,7 +45,7 @@
#ifndef VTK_IMPLEMENT_MESA_CXX
vtkCxxRevisionMacro(vtkOpenGLPolyDataMapper, "1.98");
vtkCxxRevisionMacro(vtkOpenGLPolyDataMapper, "1.99");
vtkStandardNewMacro(vtkOpenGLPolyDataMapper);
#endif
......@@ -1460,7 +1460,7 @@ void vtkOpenGLPolyDataMapperDrawTStripLines(int idx,
default:
{
int j;
vtkIdType nPts = 0;
vtkIdType nPts;
int count = 0;
for (ca->InitTraversal(); noAbort && ca->GetNextCell(nPts,ptIds);
count++)
......@@ -1604,7 +1604,7 @@ int vtkOpenGLPolyDataMapper::Draw(vtkRenderer *aren, vtkActor *act)
vtkPolyData *input = this->GetInput();
int cellScalars = 0;
vtkIdType cellNum = 0;
int cellNormals = 0;
int cellNormals;
int resolve=0, zResolve=0;
double zRes = 0.0;
......
......@@ -26,7 +26,7 @@
#include "vtkUnsignedCharArray.h"
#ifndef VTK_IMPLEMENT_MESA_CXX
vtkCxxRevisionMacro(vtkOpenGLRenderWindow, "1.66");
vtkCxxRevisionMacro(vtkOpenGLRenderWindow, "1.67");
#endif
#define MAX_LIGHTS 8
......@@ -207,8 +207,8 @@ unsigned char* vtkOpenGLRenderWindow::GetPixelData(int x1, int y1,
x_hi = x1;
}
unsigned char *data = NULL;
data = new unsigned char[(x_hi - x_low + 1)*(y_hi - y_low + 1)*3];
unsigned char *data =
new unsigned char[(x_hi - x_low + 1)*(y_hi - y_low + 1)*3];
this->GetPixelData(x1, y1, x2, y2, front, data);
return data;
}
......@@ -1172,7 +1172,7 @@ int vtkOpenGLRenderWindow::GetZbufferData( int x1, int y1, int x2, int y2,
float *vtkOpenGLRenderWindow::GetZbufferData( int x1, int y1, int x2, int y2 )
{
float *z_data = NULL;
float *z_data;
int width, height;
width = abs(x2 - x1)+1;
......
......@@ -33,7 +33,7 @@
#include "vtkTimerLog.h"
#include "vtkVolume.h"
vtkCxxRevisionMacro(vtkRenderer, "1.208");
vtkCxxRevisionMacro(vtkRenderer, "1.209");
//----------------------------------------------------------------------------
// Needed when we don't use the vtkStandardNewMacro.
......@@ -217,7 +217,7 @@ void vtkRenderer::Render(void)
this->PropArrayCount = 0;
vtkCollectionSimpleIterator pit;
for ( i = 0, this->Props->InitTraversal(pit);
for ( this->Props->InitTraversal(pit);
(aProp = this->Props->GetNextProp(pit));i++ )
{
if ( aProp->GetVisibility() )
......@@ -621,7 +621,6 @@ void vtkRenderer::CreateLight(void)
this->CreatedLight->Register(this);
this->AddLight(this->CreatedLight);
l->Delete();
l = NULL;
this->CreatedLight->SetLightTypeToHeadlight();
......
......@@ -31,7 +31,7 @@
#include <sys/stat.h>
vtkStandardNewMacro(vtkTesting);
vtkCxxRevisionMacro(vtkTesting, "1.18");
vtkCxxRevisionMacro(vtkTesting, "1.19");
vtkCxxSetObjectMacro(vtkTesting, RenderWindow, vtkRenderWindow);
// Function returning either a command line argument, an environment variable
......@@ -52,7 +52,7 @@ char* vtkTestUtilitiesGetArgOrEnvOrDefault(const char* arg,
}
}
char* value = 0;
char* value;
if (index != -1)
{
......@@ -90,7 +90,7 @@ char* vtkTestUtilitiesExpandFileNameWithArgOrEnvOrDefault(const char* arg,
const char* fname,
int slash)
{
char* fullName = 0;
char* fullName;
char* value = vtkTestUtilitiesGetArgOrEnvOrDefault(arg, argc, argv,
env, def);
......@@ -511,7 +511,7 @@ int vtkTesting::RegressionTest(vtkImageData* image, double thresh, ostream& os)
// If the test failed with the first image (foo.png) check if there are
// images of the form foo_N.png (where N=1,2,3...) and compare against
// them.
double error=0;
double error;
int count=1, errIndex=-1;
char* newFileName;
while (!passed)
......
......@@ -330,8 +330,7 @@ extern "C"
if (self->ImageViewer)
{
int netRefCount = 0;
netRefCount = self->ImageViewer->GetReferenceCount();
int netRefCount = self->ImageViewer->GetReferenceCount();
if (self->ImageViewer->GetRenderWindow()->GetInteractor() &&
self->ImageViewer->GetRenderWindow()->GetInteractor()->GetRenderWindow() == self->ImageViewer->GetRenderWindow() &&
self->ImageViewer->GetRenderWindow()->GetInteractor()->GetReferenceCount() == 1)
......@@ -565,8 +564,7 @@ static int vtkTkImageViewerWidget_MakeImageViewer(struct vtkTkImageViewerWidget
if (self->IV[0] == '\0')
{
// Make the ImageViewer window.
self->ImageViewer = vtkImageViewer::New();
ImageViewer = (vtkImageViewer *)(self->ImageViewer);
self->ImageViewer = ImageViewer = vtkImageViewer::New();
#ifndef VTK_PYTHON_BUILD
vtkTclGetObjectFromPointer(self->Interp, self->ImageViewer,
vtkImageViewerCommand);
......
......@@ -133,7 +133,7 @@ extern "C" {
char **argv)
{
int status = 0;
vtkImageData* image = NULL;
vtkImageData* image;
Tk_PhotoHandle photo;
int slice = 0;
double window = 256.0;
......@@ -610,8 +610,7 @@ extern "C"
if (self->RenderWindow)
{
int netRefCount = 0;
netRefCount = self->RenderWindow->GetReferenceCount();
int netRefCount = self->RenderWindow->GetReferenceCount();
if (self->RenderWindow->GetInteractor() &&
self->RenderWindow->GetInteractor()->GetRenderWindow() == self->RenderWindow &&
self->RenderWindow->GetInteractor()->GetReferenceCount() == 1)
......
......@@ -33,7 +33,7 @@
#include "vtkVolumeProperty.h"
#include "vtkUnstructuredGridVolumeRayCastIterator.h"
vtkCxxRevisionMacro(vtkUnstructuredGridBunykRayCastFunction, "1.31");
vtkCxxRevisionMacro(vtkUnstructuredGridBunykRayCastFunction, "1.32");
vtkStandardNewMacro(vtkUnstructuredGridBunykRayCastFunction);
#define VTK_BUNYKRCF_NUMLISTS 100000
......@@ -96,7 +96,7 @@ private:
void operator=(const vtkUnstructuredGridBunykRayCastIterator&); // Not implemented
};
vtkCxxRevisionMacro(vtkUnstructuredGridBunykRayCastIterator, "1.31");
vtkCxxRevisionMacro(vtkUnstructuredGridBunykRayCastIterator, "1.32");
vtkStandardNewMacro(vtkUnstructuredGridBunykRayCastIterator);
vtkUnstructuredGridBunykRayCastIterator::vtkUnstructuredGridBunykRayCastIterator()
......@@ -566,8 +566,6 @@ void vtkUnstructuredGridBunykRayCastFunction::UpdateTriangleList()
// Provide a warning if we find anything other than tetra
int warningNeeded = 0;
int searchCount = 0;
// Create a set of links from each tetra to the four triangles
// This is redundant information, but saves time during rendering
this->TetraTriangles = new Triangle *[4 * numCells];
......@@ -629,7 +627,6 @@ void vtkUnstructuredGridBunykRayCastFunction::UpdateTriangleList()
Triangle *triPtr = tmpList[tri[0]%VTK_BUNYKRCF_NUMLISTS];
while ( triPtr )
{
searchCount++;
if ( triPtr->PointIndex[0] == tri[0] &&
triPtr->PointIndex[1] == tri[1] &&
triPtr->PointIndex[2] == tri[2] )
......@@ -752,21 +749,11 @@ void vtkUnstructuredGridBunykRayCastFunction::ComputeViewDependentInfo()
void vtkUnstructuredGridBunykRayCastFunction::ComputePixelIntersections()
{
int numExterior = 0;
int numInterior = 0;
Triangle *triPtr = this->TriangleList;
while ( triPtr )
{
if ( triPtr->ReferredByTetra[1] != -1 )
{
numInterior++;
}
if ( triPtr->ReferredByTetra[1] == -1 )
{
numExterior++;
if ( this->IsTriangleFrontFacing( triPtr, triPtr->ReferredByTetra[0] ) )
{
int minX = static_cast<int>(this->Points[3*triPtr->PointIndex[0]]);
......
......@@ -33,7 +33,7 @@
#include "vtkTexture.h"
#include "vtkTransform.h"
vtkCxxRevisionMacro(vtkVRMLExporter, "1.78");
vtkCxxRevisionMacro(vtkVRMLExporter, "1.79");
vtkStandardNewMacro(vtkVRMLExporter);
vtkVRMLExporter::vtkVRMLExporter()
......@@ -236,7 +236,7 @@ void vtkVRMLExporter::WriteAnActor(vtkActor *anActor, FILE *fp)
vtkPolyData *pd;
vtkGeometryFilter *gf = NULL;
vtkPointData *pntData;
vtkPoints *points = NULL;
vtkPoints *points;
vtkDataArray *normals = NULL;
vtkDataArray *tcoords = NULL;
int i, i1, i2;
......
......@@ -30,7 +30,7 @@
#include <math.h>
vtkCxxRevisionMacro(vtkVolume, "1.80");
vtkCxxRevisionMacro(vtkVolume, "1.81");
vtkStandardNewMacro(vtkVolume);
// Creates a Volume with the following defaults: origin(0,0,0)
......@@ -531,7 +531,7 @@ void vtkVolume::UpdateTransferFunctions( vtkRenderer *vtkNotUsed(ren) )
vtkColorTransferFunction *rgbtf;
int colorChannels;
int arraySize = 0;
int arraySize;
// Check that we have scalars
if ( this->Mapper == NULL ||
......
......@@ -22,7 +22,7 @@
#include <math.h>
vtkCxxRevisionMacro(vtkVolumeRayCastCompositeFunction, "1.37");
vtkCxxRevisionMacro(vtkVolumeRayCastCompositeFunction, "1.38");
vtkStandardNewMacro(vtkVolumeRayCastCompositeFunction);
#define VTK_REMAINING_OPACITY 0.02
......@@ -51,7 +51,7 @@ void vtkCastRay_NN_Unshaded( T *data_ptr, vtkVolumeRayCastDynamicInfo *dynamicIn
float *CTF;
float *GTF;
float *GOTF;
int offset=0;
int offset;
int steps_this_ray = 0;
int grad_op_is_constant;
float gradient_opacity_constant;
......@@ -255,7 +255,7 @@ template <class T>
void vtkCastRay_NN_Shaded( T *data_ptr, vtkVolumeRayCastDynamicInfo *dynamicInfo,
vtkVolumeRayCastStaticInfo *staticInfo )
{
int value = 0;
int value;
unsigned char *grad_mag_ptr = NULL;
float accum_red_intensity;
float accum_green_intensity;
......@@ -278,7 +278,7 @@ void vtkCastRay_NN_Shaded( T *data_ptr, vtkVolumeRayCastDynamicInfo *dynamicInfo
float red_shaded_value = 0.0;
float green_shaded_value = 0.0;
float blue_shaded_value = 0.0;
int offset = 0;
int offset;
int steps_this_ray = 0;
int grad_op_is_constant;
float gradient_opacity_constant;
......@@ -544,7 +544,7 @@ void vtkCastRay_TrilinSample_Unshaded( T *data_ptr, vtkVolumeRayCastDynamicInfo
vtkVolumeRayCastStaticInfo *staticInfo )
{
unsigned char *grad_mag_ptr = NULL;
unsigned char *gmptr = NULL;
unsigned char *gmptr;
float accum_red_intensity;
float accum_green_intensity;
float accum_blue_intensity;
......@@ -895,7 +895,7 @@ void vtkCastRay_TrilinSample_Shaded( T *data_ptr, vtkVolumeRayCastDynamicInfo *d
vtkVolumeRayCastStaticInfo *staticInfo )
{
unsigned char *grad_mag_ptr = NULL;
unsigned char *gmptr = NULL;
unsigned char *gmptr;
float accum_red_intensity;
float accum_green_intensity;
float accum_blue_intensity;
......@@ -2125,7 +2125,6 @@ void vtkCastRay_TrilinVertices_Shaded( T *data_ptr, vtkVolumeRayCastDynamicInfo
offset = voxel[2] * zinc + voxel[1] * yinc + voxel[0];
dptr = data_ptr + offset;
nptr = encoded_normals + offset;
goptr = grad_mag_ptr + offset;
A = SOTF[(*(dptr))];
B = SOTF[(*(dptr + Binc))];
......
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