diff src/load-path.cc @ 8008:4d13a7a2f6ab

dir_path: use singleton class for static data members
author John W. Eaton <jwe@octave.org>
date Tue, 05 Aug 2008 12:04:10 -0400
parents a2ab20ba78f7
children 0ef13e15319b
line wrap: on
line diff
--- a/src/load-path.cc	Mon Aug 04 23:44:50 2008 -0400
+++ b/src/load-path.cc	Tue Aug 05 12:04:10 2008 -0400
@@ -419,7 +419,7 @@
       if (path.empty ())
 	path = tpath;
       else
-	path += dir_path::path_sep_str + tpath;
+	path += dir_path::path_sep_str () + tpath;
     }
 }
 
@@ -448,10 +448,10 @@
   std::string xpath = ".";
 
   if (! tpath.empty ())
-    xpath += dir_path::path_sep_str + tpath;
+    xpath += dir_path::path_sep_str () + tpath;
 
   if (! sys_path.empty ())
-    xpath += dir_path::path_sep_str + sys_path;
+    xpath += dir_path::path_sep_str () + sys_path;
 
   do_set (xpath, false);
 }
@@ -473,7 +473,7 @@
   std::list<std::string> retval;
 
   size_t beg = 0;
-  size_t end = p.find (dir_path::path_sep_char);
+  size_t end = p.find (dir_path::path_sep_char ());
 
   size_t len = p.length ();
 
@@ -489,7 +489,7 @@
       if (beg == len)
 	break;
 
-      end = p.find (dir_path::path_sep_char, beg);
+      end = p.find (dir_path::path_sep_char (), beg);
     }
 
   std::string elt = p.substr (beg);
@@ -1246,7 +1246,7 @@
     xpath = xdirs[0];
 
   for (octave_idx_type i = 1; i < len; i++)
-    xpath += dir_path::path_sep_str + xdirs[i];
+    xpath += dir_path::path_sep_str () + xdirs[i];
 
   return xpath;
 }
@@ -1610,7 +1610,7 @@
 		  file_stat fs (nm);
 
 		  if (fs && fs.is_dir ())
-		    retval += dir_path::path_sep_str + genpath (nm);
+		    retval += dir_path::path_sep_str () + genpath (nm);
 		}
 	    }
 	}
@@ -1754,7 +1754,7 @@
 	  std::string path = argv[1];
 
 	  for (int i = 2; i < argc; i++)
-	    path += dir_path::path_sep_str + argv[i];
+	    path += dir_path::path_sep_str () + argv[i];
 
 	  load_path::set (path, true);
 	}