]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To improve memory size calculation
authorapo <apo@opencascade.com>
Wed, 29 Nov 2006 17:12:12 +0000 (17:12 +0000)
committerapo <apo@opencascade.com>
Wed, 29 Nov 2006 17:12:12 +0000 (17:12 +0000)
src/VISU_I/VISU_GaussPoints_i.cc
src/VISU_I/VISU_Vectors_i.cc

index 23b2c3f79e0838070ca588868324d80efe448f93..876baac4e0caa8176cb9f338c585c670e4875d5b 100644 (file)
@@ -74,8 +74,9 @@ VISU::GaussPoints_i
       aSize *= INCMEMORY;
       aResult = VISU_PipeLine::CheckAvailableMemory(aSize);
       if(MYDEBUG) 
-       MESSAGE("Vectors_i::IsPossible - CheckAvailableMemory = "<<float(aSize)<<"; aResult = "<<aResult);
+       MESSAGE("GaussPoints_i::IsPossible - CheckAvailableMemory = "<<float(aSize)<<"; aResult = "<<aResult);
     }
+    return aResult;
   }catch(std::exception& exc){
     INFOS("Follow exception was occured :\n"<<exc.what());
   }catch(...){
index 3eea16a157ae65a3b7e4dc5ce730159edc212b8b..114376995a5b67f547025a760cb82f783fb6e42a 100644 (file)
@@ -54,14 +54,13 @@ VISU::Vectors_i
             CORBA::Long theTimeStampNumber,
             bool theIsMemoryCheck)
 {
-  size_t aResult = 0;
   try{
-    aResult = TSuperClass::IsPossible(theResult,
-                                     theMeshName,
-                                     theEntity,
-                                     theFieldName,
-                                     theTimeStampNumber,
-                                     false);
+    size_t aResult = TSuperClass::IsPossible(theResult,
+                                            theMeshName,
+                                            theEntity,
+                                            theFieldName,
+                                            theTimeStampNumber,
+                                            false);
     if(theIsMemoryCheck && aResult){
       VISU::Result_i::TInput* anInput = theResult->GetInput();
       float aSize = anInput->GetTimeStampSize(theMeshName,
@@ -73,12 +72,13 @@ VISU::Vectors_i
       if(MYDEBUG) 
        MESSAGE("Vectors_i::IsPossible - CheckAvailableMemory = "<<float(aSize)<<"; aResult = "<<aResult);
     }
+    return aResult;
   }catch(std::exception& exc){
     INFOS("Follow exception was occured :\n"<<exc.what());
   }catch(...){
     INFOS("Unknown exception was occured!");
   }
-  return aResult;
+  return 0;
 }
 
 //---------------------------------------------------------------