From e8a1a7012502019c8509661c6e08669fb6aa7ce5 Mon Sep 17 00:00:00 2001 From: apo Date: Thu, 30 Nov 2006 16:14:45 +0000 Subject: [PATCH] To fix regressions --- src/PIPELINE/VISU_Plot3DPL.cxx | 24 ++++++++++++------------ src/PIPELINE/VISU_StreamLinesPL.cxx | 4 ++-- src/PIPELINE/VISU_StreamLinesPL.hxx | 2 +- src/VISU_I/VISU_StreamLines_i.cc | 18 +++++++++--------- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/PIPELINE/VISU_Plot3DPL.cxx b/src/PIPELINE/VISU_Plot3DPL.cxx index 73edbdfd..54f4c0c2 100644 --- a/src/PIPELINE/VISU_Plot3DPL.cxx +++ b/src/PIPELINE/VISU_Plot3DPL.cxx @@ -222,24 +222,24 @@ unsigned long int VISU_Plot3DPL ::GetMemorySize() { - vtkDataSet* aDataSet = myGeometryFilter->GetOutput(); - unsigned long int aSize = aDataSet->GetActualMemorySize() * 1024; - - if(myCellDataToPointData->GetInput()){ - aDataSet = myCellDataToPointData->GetOutput(); + unsigned long int aSize = 0; + if(vtkDataSet* aDataSet = myGeometryFilter->GetInput()) aSize += aDataSet->GetActualMemorySize() * 1024; - } + + if(myCellDataToPointData->GetInput()) + if(vtkDataSet* aDataSet = myCellDataToPointData->GetOutput()) + aSize += aDataSet->GetActualMemorySize() * 1024; - aDataSet = myContourFilter->GetInput(); - aSize += aDataSet->GetActualMemorySize() * 1024; + if(vtkDataSet* aDataSet = myContourFilter->GetInput()) + aSize += aDataSet->GetActualMemorySize() * 1024; - aDataSet = myWarpScalar->GetInput(); - aSize += aDataSet->GetActualMemorySize() * 1024; + if(vtkDataSet* aDataSet = myWarpScalar->GetInput()) + aSize += aDataSet->GetActualMemorySize() * 1024; int anEnd = myAppendPolyData->GetNumberOfInputs(); for(int anId = 0; anId < anEnd; anId++){ - aDataSet = myAppendPolyData->GetInput(anId); - aSize += aDataSet->GetActualMemorySize() * 1024; + if(vtkDataSet* aDataSet = myAppendPolyData->GetInput(anId)) + aSize += aDataSet->GetActualMemorySize() * 1024; } aSize += Superclass::GetMemorySize(); diff --git a/src/PIPELINE/VISU_StreamLinesPL.cxx b/src/PIPELINE/VISU_StreamLinesPL.cxx index 03298fcc..62cd50b4 100644 --- a/src/PIPELINE/VISU_StreamLinesPL.cxx +++ b/src/PIPELINE/VISU_StreamLinesPL.cxx @@ -154,7 +154,7 @@ VISU_StreamLinesPL } -int +size_t VISU_StreamLinesPL ::SetParams(vtkFloatingPointType theIntStep, vtkFloatingPointType thePropogationTime, @@ -172,7 +172,7 @@ VISU_StreamLinesPL theIntStep = CorrectIntegrationStep(theIntStep,aPointSet,thePercents); thePropogationTime = CorrectPropagationTime(thePropogationTime,aPointSet); theStepLength = CorrectStepLength(theStepLength,aPointSet); - int isAccepted = FindPossibleParams(aPointSet,theStepLength,thePropogationTime,thePercents); + size_t isAccepted = FindPossibleParams(aPointSet,theStepLength,thePropogationTime,thePercents); if((!isOnlyTry && isAccepted) || (isOnlyTry && isAccepted == 1)){ mySource = theSource; myPercents = thePercents; diff --git a/src/PIPELINE/VISU_StreamLinesPL.hxx b/src/PIPELINE/VISU_StreamLinesPL.hxx index 5ea3455b..bf45db45 100644 --- a/src/PIPELINE/VISU_StreamLinesPL.hxx +++ b/src/PIPELINE/VISU_StreamLinesPL.hxx @@ -58,7 +58,7 @@ public: ShallowCopy(VISU_PipeLine *thePipeLine); virtual - int + size_t SetParams(vtkFloatingPointType theIntStep, vtkFloatingPointType thePropogationTime, vtkFloatingPointType theStepLength, diff --git a/src/VISU_I/VISU_StreamLines_i.cc b/src/VISU_I/VISU_StreamLines_i.cc index f830214a..393b79fa 100644 --- a/src/VISU_I/VISU_StreamLines_i.cc +++ b/src/VISU_I/VISU_StreamLines_i.cc @@ -220,16 +220,16 @@ VISU::StreamLines_i myAppendFilter->AddInput(aPrs3d->GetPipeLine()->GetMapper()->GetInput()); aSource = myAppendFilter->GetOutput(); } - int anIsAccepted = myStreamLinesPL->SetParams(theIntStep, - thePropogationTime, - theStepLength, - aSource, - thePercents, - theDirection, - 1); - if(anIsAccepted == 1) + size_t anIsAccepted = myStreamLinesPL->SetParams(theIntStep, + thePropogationTime, + theStepLength, + aSource, + thePercents, + theDirection, + 1); + if(anIsAccepted) SetSource(aPrs3d); - return anIsAccepted == 1; + return anIsAccepted; } -- 2.39.2