From d75efb5ed4d7657e732602d776c87865da693880 Mon Sep 17 00:00:00 2001 From: jfa Date: Mon, 21 May 2007 08:01:27 +0000 Subject: [PATCH] Fix implementation of CheckAvailableMemory() method: returned value of type size_t is used. --- src/PIPELINE/VISU_PipeLine.cxx | 6 +++--- src/PIPELINE/VISU_PipeLine.hxx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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 -- 2.39.2