]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix implementation of CheckAvailableMemory() method: returned value of type size_t...
authorjfa <jfa@opencascade.com>
Mon, 21 May 2007 08:01:27 +0000 (08:01 +0000)
committerjfa <jfa@opencascade.com>
Mon, 21 May 2007 08:01:27 +0000 (08:01 +0000)
src/PIPELINE/VISU_PipeLine.cxx
src/PIPELINE/VISU_PipeLine.hxx

index 2d098595a09d157b5ff1fbf6dba338ef77fc9932..06661f017aa686815df71663c4ec3aa63d8b8e22 100644 (file)
@@ -391,7 +391,7 @@ VISU_PipeLine
 
 
 //----------------------------------------------------------------------------
-bool
+size_t
 VISU_PipeLine
 ::CheckAvailableMemory(double theSize)
 {
@@ -400,13 +400,13 @@ VISU_PipeLine
       size_t aSize = size_t(theSize);
       if(char *aCheck = new char[aSize]){
        delete [] aCheck;
-       return true;
+       return aSize;
       }
     }catch(std::bad_alloc& exc){
     }catch(...){
     }
   }
-  return false;
+  return 0;
 }
 
 
index 73a29173eaa94633283bc33fab74da2ebcb1032f..5301593714de39a4d3468f01f40db3f3edee2cbd 100644 (file)
@@ -173,7 +173,7 @@ public:
 
   //----------------------------------------------------------------------------
   static
-  bool
+  size_t
   CheckAvailableMemory(double theSize);
 
   static