From: srn Date: Mon, 26 Nov 2007 14:21:47 +0000 (+0000) Subject: Fixed bug in method getTitle X-Git-Tag: V4_1_0rc2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ee78ad85e8d85cedd59b782f2b46c50c89d06600;p=modules%2Fkernel.git Fixed bug in method getTitle --- 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); }