From ddfd078fc9d5e89095129c6abfe81f0c840ea283 Mon Sep 17 00:00:00 2001 From: rnv Date: Fri, 28 Nov 2008 13:23:12 +0000 Subject: [PATCH] Dump Python Extension. --- src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx index 762f2e766..51d00c1a2 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx @@ -246,7 +246,7 @@ vector SALOMEDSImpl_Tool::splitStringWithEmpty(const string& theValue, c vector aResult; if(theValue[0] == sep ) aResult.push_back(string()); int pos = theValue.find(sep); - if(pos < 0 && theValue.size() > 0) { + if(pos < 0 ) { aResult.push_back(theValue); return aResult; } @@ -272,9 +272,11 @@ vector SALOMEDSImpl_Tool::splitStringWithEmpty(const string& theValue, c vector< vector > SALOMEDSImpl_Tool::splitStringWithEmpty(const string& theValue, char sep1, char sep2) { vector< vector > aResult; - vector aSections = splitStringWithEmpty( theValue, sep1 ); - for( int i = 0, n = aSections.size(); i < n; i++ ) - aResult.push_back( splitStringWithEmpty( aSections[i], sep2 ) ); + if(theValue.size() > 0) { + vector aSections = splitStringWithEmpty( theValue, sep1 ); + for( int i = 0, n = aSections.size(); i < n; i++ ) + aResult.push_back( splitStringWithEmpty( aSections[i], sep2 ) ); + } return aResult; } -- 2.39.2