]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/file-path.cc
* flower/include/std-string.hh: String/std::string compatibility:
[lilypond.git] / flower / file-path.cc
index e1c387a5ae0152ad6d40ef88c0b6b30861016bfe..19d9d9bfaba0b73d23689a54fe874234070afca6 100644 (file)
@@ -42,10 +42,10 @@ File_path::parse_path (Std_string p)
   while ((len = p.length ()))
     {
       int i = p.find (PATHSEP);
-      if (i < 0)
+      if (i == NPOS)
        i = len;
-      append (String (p, 0, i));
-      p = String (p, i + 1);
+      append (p.substr (0, i));
+      p = p.substr (min (int(len), i + 1));
     }
 }
 
@@ -113,7 +113,7 @@ File_path::find (Std_string name) const
     return name;
 
 #ifdef __MINGW32__
-  if (name.find ('\\') >= 0)
+  if (name.find ('\\') != NPOS)
     programming_error ("file name not normalized: " + name);
 #endif /* __MINGW32__ */