Commit fb7a3909 authored by Sean McBride's avatar Sean McBride

Fixed many 'redundantAssignment' cppcheck warnings

parent 6eedef44
......@@ -78,6 +78,12 @@ nullPointerRedundantCheck:Filters/General/vtkMultiThreshold.cxx
oppositeInnerCondition:Rendering/VolumeOpenGL/vtkOpenGLVolumeTextureMapper3D.cxx
pointerPositive:Common/DataModel/vtkUnstructuredGridCellIterator.cxx
redundantAssignInSwitch:Wrapping/Tools/vtkWrapPythonOverload.c
redundantAssignment:Filters/General/vtkApproximatingSubdivisionFilter.cxx
redundantAssignment:Filters/General/vtkInterpolatingSubdivisionFilter.cxx
redundantAssignment:Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx
redundantAssignment:Rendering/OpenGL2/vtkRenderbuffer.cxx
redundantAssignment:Rendering/OpenGL2/vtkTextureObject.cxx
redundantAssignment:Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx
stlIfStrFind:Infovis/Core/vtkPipelineGraphSource.cxx
unassignedVariable:Common/Transforms/vtkHomogeneousTransform.cxx
unassignedVariable:Filters/Core/vtkFlyingEdges3D.cxx
......
......@@ -1667,17 +1667,16 @@ double vtkAxis::LogScaleTickMark(double number,
bool &niceValue,
int &order)
{
double result(0.0);
niceValue = false;
// We need to retrive the order of our number.
order = static_cast<int>(floor(log10(number)));
// We retrive the basis of our number depending on roundUp and return it as
// result.
number = number * pow(10.0, static_cast<double>(order*(-1)));
result = roundUp ? ceil(number) : floor(number);
double result = roundUp ? ceil(number) : floor(number);
// If result is 1.0, 2.0 or 5.0 we mark the result as "nice value".
niceValue = false;
if (result == 1.0 || result == 2.0 || result == 5.0)
{
niceValue = true;
......
......@@ -251,11 +251,10 @@ int TestAMRBoxIntersection()
// Save the initial
A0 = A;
bool doesIntersect = false;
B = A;
B.Shrink( 2 );
doesIntersect = A.Intersect( B );
bool doesIntersect = A.Intersect( B );
if( !doesIntersect || (A != B) )
{
std::cerr << "ERROR: Intersecting a fully encompassing box failed!\n";
......
......@@ -255,6 +255,7 @@ bool TestMixedDispatch()
int result = dispatcher.Go(as<vtkDataArray>(doubleArray.GetPointer()));
result = dispatcher.Go(intArray.GetPointer());
test_expression(result==2,"unexpected");
result = dispatcher.Go(doubleArray.GetPointer());
test_expression(result==3,"statefull functor failed with int and double");
......
......@@ -99,9 +99,7 @@ int TestStaticCellLinks( int, char *[] )
extract->Update();
// Grab the output, build links on unstructured grid
vtkSmartPointer<vtkUnstructuredGrid> ugrid =
vtkSmartPointer<vtkUnstructuredGrid>::New();
ugrid = extract->GetOutput();
vtkSmartPointer<vtkUnstructuredGrid> ugrid = extract->GetOutput();
vtkStaticCellLinksTemplate<int> slinks;
slinks.BuildLinks(ugrid);
......@@ -157,9 +155,7 @@ int TestStaticCellLinks( int, char *[] )
ss->SetPhiResolution(10);
ss->Update();
vtkSmartPointer<vtkPolyData> pdata =
vtkSmartPointer<vtkPolyData>::New();
pdata = ss->GetOutput();
vtkSmartPointer<vtkPolyData> pdata = ss->GetOutput();
slinks.Initialize(); //reuse
slinks.BuildLinks(pdata);
......
......@@ -254,11 +254,9 @@ vtkIdType vtkIncrementalOctreePointLocator::FindClosestInsertedPoint
double miniDist2 = this->OctreeMaxDimSize * this->OctreeMaxDimSize * 4.0;
double elseDist2; // inter-node search
vtkIdType elsePntId; // inter-node search
vtkIdType pointIndx = -1;
vtkIncrementalOctreeNode * pLeafNode = NULL;
pLeafNode = this->GetLeafContainer( this->OctreeRootNode, x );
pointIndx = this->FindClosestPointInLeafNode( pLeafNode, x, &miniDist2 );
vtkIncrementalOctreeNode * pLeafNode = this->GetLeafContainer( this->OctreeRootNode, x );
vtkIdType pointIndx = this->FindClosestPointInLeafNode( pLeafNode, x, &miniDist2 );
if ( miniDist2 > 0.0 )
{
......
......@@ -568,10 +568,6 @@ int vtkPolygon::ParameterizePolygon(double *p0, double *p10, double& l10,
{
p[j] = x1[j] - p0[j];
}
#ifdef BAD_WITH_NODEBUG
s = vtkMath::Dot(p,p10) / l10;
t = vtkMath::Dot(p,p20) / l20;
#endif
s = (p[0]*p10[0] + p[1]*p10[1] + p[2]*p10[2]) / l10;
t = (p[0]*p20[0] + p[1]*p20[1] + p[2]*p20[2]) / l20;
sbounds[0] = (s<sbounds[0]?s:sbounds[0]);
......
......@@ -556,11 +556,11 @@ double vtkTimerLog::GetUniversalTime()
//----------------------------------------------------------------------------
double vtkTimerLog::GetCPUTime()
{
double currentCPUTime = 1.0;
#ifndef _WIN32_WCE
currentCPUTime = static_cast<double>(clock()) /static_cast<double>(CLOCKS_PER_SEC);
return static_cast<double>(clock()) /static_cast<double>(CLOCKS_PER_SEC);
#else
return 1.0;
#endif
return currentCPUTime;
}
//----------------------------------------------------------------------------
......
......@@ -69,13 +69,8 @@ int vtkSimpleBondPerceiver::RequestData(
output->ShallowCopyAttributes(input);
// Get pointers to data
vtkSmartPointer<vtkUnsignedShortArray> numArr =
vtkSmartPointer<vtkUnsignedShortArray>::New();
vtkSmartPointer<vtkPoints> posArr =
vtkSmartPointer<vtkPoints>::New();
posArr = output->GetAtomicPositionArray();
numArr = output->GetAtomicNumberArray();
vtkSmartPointer<vtkPoints> posArr = output->GetAtomicPositionArray();
vtkSmartPointer<vtkUnsignedShortArray> numArr = output->GetAtomicNumberArray();
// Cache atomic radii
vtkNew<vtkPeriodicTable> pTab;
......
......@@ -141,15 +141,13 @@ vtkOverlappingAMR* GetAMRDataSet()
double h[3];
int ndim[3];
int blockId = -1;
int level = -1;
// Root Block -- Block 0,0
ndim[0] = 6; ndim[1] = 5; ndim[2] = 1;
h[0] = h[1] = h[2] = 1.0;
blockId = 0;
level = 0;
int blockId = 0;
int level = 0;
vtkUniformGrid *root = AMRCommon::GetGrid(origin, h, ndim);
vtkAMRBox box(origin, ndim, h, data->GetOrigin(), data->GetGridDescription());
AttachPulseToGrid( root );
......
......@@ -138,15 +138,13 @@ vtkOverlappingAMR* GetAMRDataSet()
double origin[3];
double h[3];
int ndim[3];
int blockId = -1;
int level = -1;
// Root Block -- Block 0
ndim[0] = 6; ndim[1] = ndim[2] = 5;
h[0] = h[1] = h[2] = 1.0;
origin[0] = origin[1] = origin[2] = -2.0;
blockId = 0;
level = 0;
int blockId = 0;
int level = 0;
vtkUniformGrid *root = AMRCommon::GetGrid(origin,h,ndim);
vtkAMRBox box(origin,ndim,h,data->GetOrigin(), data->GetGridDescription());
AttachPulseToGrid( root );
......
......@@ -107,12 +107,12 @@ OpenGLScene::OpenGLScene(QGLContext* ctx, QObject* p)
trans->addAnimation(new QBoolAnimation(1.0, mTreeRingView, "enabled")); // enable at end of transition
// non animated transitions
trans = state1->addTransition(this, SIGNAL(enterState4()), state4);
trans = state2->addTransition(this, SIGNAL(enterState4()), state4);
trans = state3->addTransition(this, SIGNAL(enterState4()), state4);
trans = state4->addTransition(this, SIGNAL(enterState1()), state1);
trans = state4->addTransition(this, SIGNAL(enterState2()), state2);
trans = state4->addTransition(this, SIGNAL(enterState3()), state3);
state1->addTransition(this, SIGNAL(enterState4()), state4);
state2->addTransition(this, SIGNAL(enterState4()), state4);
state3->addTransition(this, SIGNAL(enterState4()), state4);
state4->addTransition(this, SIGNAL(enterState1()), state1);
state4->addTransition(this, SIGNAL(enterState2()), state2);
state4->addTransition(this, SIGNAL(enterState3()), state3);
machine.start();
......
......@@ -34,8 +34,7 @@
double exponential_distribution(const int i, const double beta)
{
double xi=0.0;
xi = ( ( exp( i*beta ) - 1 ) /( exp( beta ) - 1 ) );
double xi = ( ( exp( i*beta ) - 1 ) /( exp( beta ) - 1 ) );
return( xi );
}
......
......@@ -380,7 +380,6 @@ vtkDataObject* vtkExtractSelection::RequestDataFromBlock(
tp->SetOutput(tempSel);
subFilter->SetInputConnection(1, tp->GetOutputPort());
tp->Delete();
tp = 0;
vtkDataObject* inputCopy = input->NewInstance();
inputCopy->ShallowCopy(input);
......
......@@ -129,7 +129,6 @@ int vtkProbeSelectedLocations::RequestData(vtkInformation *vtkNotUsed(request),
subFilter->SetInputConnection(1, tp->GetOutputPort());
inputClone->Delete();
tp->Delete();
tp = 0;
tp = vtkTrivialProducer::New();
tp->SetOutput(tempInput);
......
......@@ -213,7 +213,7 @@ int TestQuadraturePoints(int argc,char *argv[])
camera->Elevation(95.0);
camera->SetViewUp(0.0,0.0,1.0);
camera->Azimuth(180.0);
camera=0;
// Setup upper right pane.
vtkSmartPointer<vtkRenderer> ren1 = vtkSmartPointer<vtkRenderer>::New();
ren1->SetViewport(0.5,0.5,1.0,1.0);
......@@ -228,7 +228,7 @@ int TestQuadraturePoints(int argc,char *argv[])
camera->OrthogonalizeViewUp();
camera->Elevation(-10.0);
camera->Azimuth(55.0);
camera=0;
// Setup lower right pane.
vtkSmartPointer<vtkRenderer> ren2 = vtkSmartPointer<vtkRenderer>::New();
ren2->SetViewport(0.5,0.0,1.0,0.5);
......@@ -236,7 +236,7 @@ int TestQuadraturePoints(int argc,char *argv[])
ren2->SetBackground(0.328125, 0.347656, 0.425781);
ren2->AddActor(surfaceActor);
ren2->ResetCamera();
camera=0;
// If interactive mode then we show wireframes for
// reference.
if (testHelper->IsInteractiveModeSpecified())
......
......@@ -708,8 +708,7 @@ bool CompareFieldsForGrid( vtkUniformGrid *grid )
grid->GetCellData()->GetArray( "EXPECTED-CellXYZ" ) );
assert( "pre: expectedCellData is NULL" && (expectedCellData != NULL) );
bool status = true;
status = CheckArrays( computedCellData, expectedCellData );
bool status = CheckArrays( computedCellData, expectedCellData );
if( !status )
{
return status;
......
......@@ -41,7 +41,6 @@
int TestPUnstructuredGridConnectivity(int argc, char* argv[])
{
int rc = 0;
double ellapsed = 0.0;
vtkTimerLog* timer = vtkTimerLog::New();
// STEP 0: Initialize
......@@ -64,7 +63,7 @@ int TestPUnstructuredGridConnectivity(int argc, char* argv[])
timer->StartTimer();
ghostGen->BuildGhostZoneConnectivity();
timer->StopTimer();
ellapsed = timer->GetElapsedTime();
double ellapsed = timer->GetElapsedTime();
vtkMPIUtilities::Printf(cntrl,"[DONE]\n");
// get some performance statistics
......
......@@ -219,8 +219,7 @@ vtkMultiBlockDataSet* GetDataSet(
//------------------------------------------------------------------------------
double exponential_distribution(const int i, const double beta)
{
double xi=0.0;
xi = ( ( exp( i*beta ) - 1 ) /( exp( beta ) - 1 ) );
double xi = ( ( exp( i*beta ) - 1 ) /( exp( beta ) - 1 ) );
return( xi );
}
......
......@@ -119,14 +119,14 @@ public:
#endif
ParseStatus status;
SEXP cmdSexp, cmdexpr = R_NilValue;
int error;
SEXP cmdSexp;
PROTECT(cmdSexp = allocVector(STRSXP, 1));
SET_STRING_ELT(cmdSexp, 0, mkChar(rcommand.c_str()));
cmdexpr = PROTECT(R_ParseVector(cmdSexp, -1, &status, R_NilValue));
SEXP cmdexpr = PROTECT(R_ParseVector(cmdSexp, -1, &status, R_NilValue));
for(int i = 0; i < length(cmdexpr); i++)
{
R_tryEval(VECTOR_ELT(cmdexpr, i),NULL,&error);
......@@ -227,15 +227,15 @@ int vtkRInterface::EvalRscript(const char *string, bool showRoutput)
{
ParseStatus status;
SEXP cmdSexp, cmdexpr = R_NilValue;
SEXP ans;
int i;
int error;
SEXP cmdSexp;
PROTECT(cmdSexp = allocVector(STRSXP, 1));
SET_STRING_ELT(cmdSexp, 0, mkChar(string));
cmdexpr = PROTECT(R_ParseVector(cmdSexp, -1, &status, R_NilValue));
SEXP cmdexpr = PROTECT(R_ParseVector(cmdSexp, -1, &status, R_NilValue));
switch (status)
{
case PARSE_OK:
......
......@@ -637,7 +637,6 @@ void vtkX3DExporter::WriteATextActor2D(vtkActor2D *anTextActor2D,
ta = static_cast<vtkTextActor*>(anTextActor2D);
tp = ta->GetTextProperty();
ds = NULL;
ds = ta->GetInput();
if (ds==NULL)
......
......@@ -357,21 +357,25 @@ void vtkGDALRasterReader::vtkGDALRasterReaderInternal::GenericReadData()
static_cast<void*>(reinterpret_cast<GByte*>(&rawUniformGridData[0]) +
0 * bandSpace), destWidth, destHeight,
this->TargetDataType, pixelSpace, lineSpace);
assert(err == CE_None);
err = greenBand->RasterIO(
GF_Read, windowX, windowY, windowWidth, windowHeight,
static_cast<void*>(reinterpret_cast<GByte*>(&rawUniformGridData[0]) +
1 * bandSpace), destWidth, destHeight,
this->TargetDataType, pixelSpace, lineSpace);
assert(err == CE_None);
err = blueBand->RasterIO(
GF_Read, windowX, windowY, windowWidth, windowHeight,
static_cast<void*>(reinterpret_cast<GByte*>(&rawUniformGridData[0]) +
2 * bandSpace), destWidth, destHeight,
this->TargetDataType, pixelSpace, lineSpace);
assert(err == CE_None);
err = alphaBand->RasterIO(
GF_Read, windowX, windowY, windowWidth, windowHeight,
static_cast<void*>(reinterpret_cast<GByte*>(&rawUniformGridData[0]) +
3 * bandSpace), destWidth, destHeight,
this->TargetDataType, pixelSpace, lineSpace);
assert(err == CE_None);
}
else
{
......@@ -383,14 +387,17 @@ void vtkGDALRasterReader::vtkGDALRasterReaderInternal::GenericReadData()
static_cast<void*>(reinterpret_cast<GByte*>(&rawUniformGridData[0]) +
0 * bandSpace), destWidth, destHeight,
this->TargetDataType, 0, 0);
assert(err == CE_None);
err = greenBand->RasterIO(GF_Read, windowX, windowY, windowWidth, windowHeight,
static_cast<void*>(reinterpret_cast<GByte*>(&rawUniformGridData[0]) +
1 * bandSpace), destWidth, destHeight,
this->TargetDataType, 0,0);
assert(err == CE_None);
err = blueBand->RasterIO(GF_Read, windowX, windowY, windowWidth, windowHeight,
static_cast<void*>(reinterpret_cast<GByte*>(&rawUniformGridData[0]) +
2 * bandSpace), destWidth, destHeight,
this->TargetDataType, 0,0);
assert(err == CE_None);
}
}
else if (greyBand)
......@@ -406,11 +413,13 @@ void vtkGDALRasterReader::vtkGDALRasterReaderInternal::GenericReadData()
static_cast<void*>(reinterpret_cast<GByte*>(&rawUniformGridData[0]) +
0 * bandSpace), destWidth, destHeight,
this->TargetDataType, pixelSpace, lineSpace);
assert(err == CE_None);
err = alphaBand->RasterIO(
GF_Read, windowX, windowY, windowWidth, windowHeight,
static_cast<void*>(reinterpret_cast<GByte*>(&rawUniformGridData[0]) +
1 * bandSpace), destWidth, destHeight,
this->TargetDataType, pixelSpace, lineSpace);
assert(err == CE_None);
}
else
{
......@@ -422,6 +431,7 @@ void vtkGDALRasterReader::vtkGDALRasterReaderInternal::GenericReadData()
static_cast<void*>(reinterpret_cast<GByte*>(&rawUniformGridData[0]) +
0 * bandSpace), destWidth, destHeight,
this->TargetDataType, pixelSpace, lineSpace);
assert(err == CE_None);
}
}
else
......@@ -429,8 +439,7 @@ void vtkGDALRasterReader::vtkGDALRasterReaderInternal::GenericReadData()
std::cerr << "Unknown raster band type \n";
return;
}
((void)err);//unused
assert(err == CE_None);
(void)err; //unused
const double* d = GetGeoCornerPoints();
double geoSpacing[] = {(d[4]-d[0])/this->Reader->RasterDimensions[0],
......
......@@ -147,7 +147,7 @@ int TestIncrementalOctreePointLocator( int argc, char * argv[] )
( argc, argv, "Data/post.vtk" );
ugReader = vtkUnstructuredGridReader::New();
ugReader->SetFileName( fileName );
delete [] fileName; fileName = NULL;
delete [] fileName;
ugReader->Update();
unstruct = ugReader->GetOutput();
dataPnts = unstruct->GetPoints();
......
......@@ -3001,14 +3001,13 @@ static int cgmImageColorAllocate(cgmImagePtr im, int r, int g, int b)
#ifdef VTK_NOT_DEFINED
static int cgmImageColor16(cgmImagePtr im)
{
int si, ei, li;
si = cgmImageAddColorIndex(im, 255, 255, 255);
int si = cgmImageAddColorIndex(im, 255, 255, 255);
if (si == -1)
{
return 0;
}
li = -1; ei=si;
ei = cgmImageAddColorIndex(im, 0, 0, 0);
int li = -1;
int ei = cgmImageAddColorIndex(im, 0, 0, 0);
if (ei != -1)
{
li = ei;
......
......@@ -1307,7 +1307,6 @@ void vtkTecplotReader::GetDataArraysList()
int guessedYid = -1;
int guessedZid = -1;
bool tokenReady = false;
std::string theTpToken = "";
std::string noSpaceTok = "";
this->Variables.clear();
......@@ -1315,7 +1314,7 @@ void vtkTecplotReader::GetDataArraysList()
this->Internal->Init();
this->Internal->ASCIIStream.open( this->FileName );
theTpToken = this->Internal->GetNextToken();
std::string theTpToken = this->Internal->GetNextToken();
while ( !this->Internal->NextCharEOF )
{
......
......@@ -81,9 +81,10 @@ public:
TexturePath = std::string(arg);
if(TexturePath.empty())
return;
char sep = '/';
#if defined(_WIN32)
sep = '\\';
const char sep = '\\';
#else
const char sep = '/';
#endif
if(TexturePath.at(TexturePath.size()-1) != sep )
TexturePath += sep;
......
......@@ -108,8 +108,7 @@ static void vtkXMLTreeReaderProcessElement(vtkMutableDirectedGraph *tree,
continue;
}
vtkIdType vertex = -1;
vertex = tree->AddVertex();
vtkIdType vertex = tree->AddVertex();
if (parent != -1)
{
tree->AddEdge(parent, vertex);
......
......@@ -190,9 +190,8 @@ int vtkMINCImageReader::CanReadFile(const char* fname)
// Do a more thorough check of the image:version attribute, since
// there are lots of NetCDF files out there that aren't minc files.
int status = NC_NOERR;
int ncid = 0;
status = nc_open(fname, 0, &ncid);
int status = nc_open(fname, 0, &ncid);
if (status != NC_NOERR)
{
return 0;
......
......@@ -344,14 +344,14 @@ int TestHyperOctreeIO(int argc, char* argv[])
cam->Azimuth(180);
renWin->Render();
int retVal = 1;
#ifdef HYPEROCTREEIO_STANDALONE
int retVal = 1;
if (interactive)
{
iren->Start();
}
#else
retVal = vtkRegressionTestImage( renWin );
int retVal = vtkRegressionTestImage( renWin );
if ( retVal == vtkRegressionTester::DO_INTERACTOR )
{
iren->Start();
......
......@@ -153,12 +153,9 @@ void vtkPerturbCoincidentVertices::SpiralPerturbation(vtkGraph *input, vtkGraph
double spiralPoint[3];
double point[3];
//double distance = sqrt(vtkMath::Distance2BetweenPoints(point1, point2));
double scale = 1.0;
//scale = (distance * 1.4)/numPoints;
// use the smallest metric to scale the spiral vertices.
scale = shortestEdge < averageDistance ? shortestEdge/4 : averageDistance/4;
double scale = shortestEdge < averageDistance ? shortestEdge/4 : averageDistance/4;
vtkSmartPointer<vtkPoints> offsets = vtkSmartPointer<vtkPoints>::New();
coincidentPoints->InitTraversal();
......
......@@ -171,12 +171,11 @@ int vtkPropAssembly::RenderOpaqueGeometry(vtkViewport *ren)
vtkAssemblyPath *path;
double fraction;
int renderedSomething=0;
double numberOfItems = 0.0;
// Make sure the paths are up-to-date
this->UpdatePaths();
numberOfItems = static_cast<double>(this->Parts->GetNumberOfItems());
double numberOfItems = static_cast<double>(this->Parts->GetNumberOfItems());
fraction = numberOfItems >= 1.0 ?
this->AllocatedRenderTime / numberOfItems : this->AllocatedRenderTime;
......@@ -204,12 +203,11 @@ int vtkPropAssembly::RenderOverlay(vtkViewport *ren)
vtkAssemblyPath *path;
double fraction;
int renderedSomething=0;
double numberOfItems = 0.0;
// Make sure the paths are up-to-date
this->UpdatePaths();
numberOfItems = static_cast<double>(this->Parts->GetNumberOfItems());
double numberOfItems = static_cast<double>(this->Parts->GetNumberOfItems());
fraction = numberOfItems >= 1.0 ?
this->AllocatedRenderTime / numberOfItems : this->AllocatedRenderTime;
......
......@@ -2196,9 +2196,8 @@ int main(int vtkNotUsed(argc), char *vtkNotUsed(argv)[])
// extensions returned by the driver.
// clean glError
GLenum errorCode=glGetError();
glTexImage2D(GL_TEXTURE_2D,0,GL_RGBA16,64,64,0, GL_RGBA, GL_FLOAT, NULL );
errorCode=glGetError();
GLenum errorCode=glGetError();
if(errorCode!=GL_NO_ERROR)
{
cout << "Loading a power-of-two texture failed with the following error:"
......
......@@ -627,7 +627,6 @@ void vtkScalarsToColorsPainter::MapScalars(vtkDataSet* output,
}
// Get rid of old colors.
colors = 0;
orig_alpha = lut->GetAlpha();
lut->SetAlpha(alpha);
colors = lut->MapScalars(abstractScalars, this->ColorMode, arraycomponent);
......
......@@ -510,10 +510,9 @@ void vtkParallelTimer::StartEvent(const char *event)
cerr << "=====vtkParallelTimer::StartEvent" << endl;
#endif
double walls = 0.0;
timeval wallt;
gettimeofday(&wallt, 0x0);
walls = static_cast<double>(wallt.tv_sec)
double walls = static_cast<double>(wallt.tv_sec)
+ static_cast<double>(wallt.tv_usec)/1.0E6;
#if vtkParallelTimerDEBUG < 0
......@@ -544,10 +543,9 @@ void vtkParallelTimer::EndEvent(const char *event)
cerr << "=====vtkParallelTimer::EndEvent" << endl;
#endif
double walle = 0.0;
timeval wallt;
gettimeofday(&wallt, 0x0);
walle = static_cast<double>(wallt.tv_sec)
double walle = static_cast<double>(wallt.tv_sec)
+ static_cast<double>(wallt.tv_usec)/1.0E6;
#if vtkParallelTimerDEBUG > 0
......
......@@ -523,7 +523,6 @@ bool vtkQtTreeRingLabelMapper::PointInWindow(double *sinfo, double *newDim,
if( dc[1] < 0 || dc[1] > winSize[1] )
return_value = false;
double height = 0., width = 0.;
double xlc = sinfo[2] * cos( vtkMath::RadiansFromDegrees(sinfo[0]) );
double xuc = sinfo[3] * cos( vtkMath::RadiansFromDegrees(sinfo[0]) );
double ylc = sinfo[2] * sin( vtkMath::RadiansFromDegrees(sinfo[0]) );
......@@ -536,10 +535,10 @@ bool vtkQtTreeRingLabelMapper::PointInWindow(double *sinfo, double *newDim,
int *dc2 = VCoord->GetComputedDisplayValue(0);
double dc2x = dc2[0];
double dc2y = dc2[1];
height = sqrt( ((dc2x-dc1x)*(dc2x-dc1x)) + ((dc2y-dc1y)*(dc2y-dc1y)) );
double height = sqrt( ((dc2x-dc1x)*(dc2x-dc1x)) + ((dc2y-dc1y)*(dc2y-dc1y)) );
double widthWC = r * vtkMath::RadiansFromDegrees( sinfo[1] - sinfo[0] );
width = widthWC * height / sqrt( (xuc-xlc)*(xuc-xlc) + (yuc-ylc)*(yuc-ylc) );
double width = widthWC * height / sqrt( (xuc-xlc)*(xuc-xlc) + (yuc-ylc)*(yuc-ylc) );
newDim[0] = width;
newDim[1] = height;
......
......@@ -583,10 +583,8 @@ bool vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::LoadVolume(
{
supportsFloat = true;
}
#else
#if GL_ES_VERSION_3_0 == 1
#elif GL_ES_VERSION_3_0 == 1
supportsFloat = true;
#endif
#endif
// scale and bias
......
......@@ -62,8 +62,7 @@ int vtkWebGLWidget::GetBinarySize(int vtkNotUsed(part))
void vtkWebGLWidget::GenerateBinaryData()
{
delete[] this->binaryData;
std::string oldMD5 = "qqehissorapaz";
oldMD5 = this->MD5;
std::string oldMD5 = this->MD5;
size_t pos = 0;
//Calculate the size used
......
......@@ -1045,7 +1045,6 @@ int checkFunctionSignature(ClassInfo *data)
void outputFunction(FILE *fp, ClassInfo *data)
{
int i;
int args_ok = 1;
unsigned int rType =
(currentFunction->ReturnType & VTK_PARSE_UNQUALIFIED_TYPE);
const char *jniFunction = 0;
......@@ -1054,7 +1053,7 @@ void outputFunction(FILE *fp, ClassInfo *data)
size_t j;
CurrentData = data;
args_ok = checkFunctionSignature(data);
int args_ok = checkFunctionSignature(data);
/* handle DataReader SetBinaryInputString as a special case */
if (!strcmp("SetBinaryInputString",currentFunction->Name) &&
......
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