]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/CDMUtilities.cpp
open project fixed for model creation. Model not created yet
[crea.git] / lib / creaDevManagerLib / CDMUtilities.cpp
index a73282f247a68f3ee4e736840ec6b2b277c39421..0149e8dbd5488000f8481549c1570bf5fe3b2070 100644 (file)
@@ -35,6 +35,7 @@
 #include "CDMUtilities.h"
 
 #include<vector>
+#include<string>
 
 namespace CDMUtilities
 {
@@ -54,36 +55,40 @@ namespace CDMUtilities
       {
         if (empties == no_empties)
           {
-            next = s.find_first_not_of( delimiters, next + 1 );
-            if (next == Container::value_type::npos) break;
+            next = s.find_first_not_of(delimiters, next + 1);
+            if (next == Container::value_type::npos)
+              {
+                break;
+              }
             next -= 1;
           }
         current = next + 1;
-        next = s.find_first_of( delimiters, current );
-        result.push_back( s.substr( current, next - current ) );
+        next = s.find_first_of(delimiters, current);
+        result.push_back(s.substr(current, next - current));
       }
     while (next != Container::value_type::npos);
     return result;
   }
 
-  const std::string& fixPath(const std::string& path)
+  const std::string fixPath(const std::string& path)
   {
     std::string pathFixed = "";
 
-  #if(_WIN32)
+#if(_WIN32)
     // ------ Windows
     //TODO: implementation for windows
-  #else
+#else
     // ------ LINUX / MacOS
     //break path into folders
     std::vector<std::string> pathSlpit;
-    splitter::split(pathSlpit, path, "\"/", splitter::no_empties);
+
+    splitter::split(pathSlpit, path, "/", splitter::no_empties);
+
     for (int i = 0; i < pathSlpit.size(); i++)
       {
-        std::cout << pathSlpit[i];
         pathFixed += "/" + pathSlpit[i];
       }
-  #endif
+#endif
     return pathFixed;
 
   }