]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To fix regressions
authorapo <apo@opencascade.com>
Thu, 30 Nov 2006 16:14:45 +0000 (16:14 +0000)
committerapo <apo@opencascade.com>
Thu, 30 Nov 2006 16:14:45 +0000 (16:14 +0000)
src/PIPELINE/VISU_Plot3DPL.cxx
src/PIPELINE/VISU_StreamLinesPL.cxx
src/PIPELINE/VISU_StreamLinesPL.hxx
src/VISU_I/VISU_StreamLines_i.cc

index 73edbdfda9151b7b5a16128fbccc10bc9a816526..54f4c0c247178a02f6aeaad41dd14bbcde14dde4 100644 (file)
@@ -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();
index 03298fcc5da4ee6c683aba2f9aa6a997253e924c..62cd50b49ba9ac2dc2fecc51a8af57198ac6ba32 100644 (file)
@@ -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;
index 5ea3455be77e8a6c6ccb429382c1553c7c7680fa..bf45db45651520e17f263f1c62f7dbd08b04fdb8 100644 (file)
@@ -58,7 +58,7 @@ public:
   ShallowCopy(VISU_PipeLine *thePipeLine);
 
   virtual
-  in
+  size_
   SetParams(vtkFloatingPointType theIntStep, 
            vtkFloatingPointType thePropogationTime,
            vtkFloatingPointType theStepLength,
index f830214a9c1d7da3783549fdcd4cff3af0e5fe93..393b79faa7fea947a7afe3a146a2e1a970c930c1 100644 (file)
@@ -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;
 }