From: jfa Date: Mon, 21 May 2007 08:01:27 +0000 (+0000) Subject: Fix implementation of CheckAvailableMemory() method: returned value of type size_t... X-Git-Tag: mergeto_BR_Dev_For_4_0_21May07~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d75efb5ed4d7657e732602d776c87865da693880;p=modules%2Fvisu.git Fix implementation of CheckAvailableMemory() method: returned value of type size_t is used. --- diff --git a/src/PIPELINE/VISU_PipeLine.cxx b/src/PIPELINE/VISU_PipeLine.cxx index 2d098595..06661f01 100644 --- a/src/PIPELINE/VISU_PipeLine.cxx +++ b/src/PIPELINE/VISU_PipeLine.cxx @@ -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; } diff --git a/src/PIPELINE/VISU_PipeLine.hxx b/src/PIPELINE/VISU_PipeLine.hxx index 73a29173..53015937 100644 --- a/src/PIPELINE/VISU_PipeLine.hxx +++ b/src/PIPELINE/VISU_PipeLine.hxx @@ -173,7 +173,7 @@ public: //---------------------------------------------------------------------------- static - bool + size_t CheckAvailableMemory(double theSize); static