]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Dump Python Extension. TG_DumpPython_Extension_3
authorrnv <rnv@opencascade.com>
Fri, 28 Nov 2008 13:23:12 +0000 (13:23 +0000)
committerrnv <rnv@opencascade.com>
Fri, 28 Nov 2008 13:23:12 +0000 (13:23 +0000)
src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx

index 762f2e766ae8cc17fd8d0e231225a7f55634c8db..51d00c1a242f98ab8ce27087e005a65f73618f74 100644 (file)
@@ -246,7 +246,7 @@ vector<string> SALOMEDSImpl_Tool::splitStringWithEmpty(const string& theValue, c
   vector<string> 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<string> SALOMEDSImpl_Tool::splitStringWithEmpty(const string& theValue, c
 vector< vector<string> > SALOMEDSImpl_Tool::splitStringWithEmpty(const string& theValue, char sep1, char sep2)
 {
   vector< vector<string> > aResult;
-  vector<string> 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<string> aSections = splitStringWithEmpty( theValue, sep1 );
+    for( int i = 0, n = aSections.size(); i < n; i++ )
+      aResult.push_back( splitStringWithEmpty( aSections[i], sep2 ) );
+  }
   return aResult;
 }