From: apo Date: Thu, 30 Nov 2006 16:14:45 +0000 (+0000) Subject: To fix regressions X-Git-Tag: WP1_2_3_05-12-2006_cache_system~16 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e8a1a7012502019c8509661c6e08669fb6aa7ce5;p=modules%2Fvisu.git To fix regressions --- 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; }