From ee78ad85e8d85cedd59b782f2b46c50c89d06600 Mon Sep 17 00:00:00 2001 From: srn Date: Mon, 26 Nov 2007 14:21:47 +0000 Subject: [PATCH] Fixed bug in method getTitle --- src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx | 2 +- src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx | 4 ++-- src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx index a4bab5781..0539b5e81 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx @@ -42,7 +42,7 @@ static std::string getTitle(std::string theString) std::string aString(theString); int aPos = aString.find(SEPARATOR); if(aPos < 1) return aString; - if(aPos == 1) return std::string(); + if(aPos == 0) return std::string(); return aString.substr(0, aPos); } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx index 62dd160b1..64c5f03a6 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx @@ -43,8 +43,8 @@ static std::string getTitle(std::string theString) { std::string aString(theString); int aPos = aString.find(SEPARATOR); - if(aPos < 1) return aString; - if(aPos == 1) return std::string(); + if(aPos < 0) return aString; + if(aPos == 0) return std::string(); return aString.substr(0, aPos); } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx index 23ba72c3f..245de358c 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx @@ -45,7 +45,7 @@ static std::string getTitle(std::string theString) std::string aString(theString); int aPos = aString.find(SEPARATOR); if(aPos < 1) return aString; - if(aPos == 1) return std::string(); + if(aPos == 0) return std::string(); return aString.substr(0, aPos); } -- 2.39.2