summaryrefslogtreecommitdiff
path: root/libs/pbd/search_path.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-02-26 17:24:38 +0100
committerRobin Gareus <robin@gareus.org>2014-02-26 18:07:45 +0100
commitce32d5f17b67a4c73105138b8dbe9ee2edf8dede (patch)
treed57df1767b60b993b4caf57a2df4f3b7f554ab60 /libs/pbd/search_path.cc
parent35272b8c47fa3dd074f2fb89a5f0ff3c883dbcef (diff)
make PBD's path-scanner OS agnostic (use glib)
Diffstat (limited to 'libs/pbd/search_path.cc')
-rw-r--r--libs/pbd/search_path.cc14
1 files changed, 2 insertions, 12 deletions
diff --git a/libs/pbd/search_path.cc b/libs/pbd/search_path.cc
index ea08785f68..0106881f84 100644
--- a/libs/pbd/search_path.cc
+++ b/libs/pbd/search_path.cc
@@ -25,16 +25,6 @@
using namespace std;
-namespace {
-
-#ifdef PLATFORM_WINDOWS
-const char * const path_delimiter = ";";
-#else
-const char * const path_delimiter = ":";
-#endif
-
-}
-
namespace PBD {
Searchpath::Searchpath ()
@@ -46,7 +36,7 @@ Searchpath::Searchpath (const string& path)
{
vector<std::string> tmp;
- if (tokenize (path, string(path_delimiter), std::back_inserter (tmp))) {
+ if (tokenize (path, string(G_SEARCHPATH_SEPARATOR_S), std::back_inserter (tmp))) {
add_directories (tmp);
}
}
@@ -79,7 +69,7 @@ Searchpath::to_string () const
for (vector<std::string>::const_iterator i = begin(); i != end(); ++i) {
path += *i;
- path += path_delimiter;
+ path += G_SEARCHPATH_SEPARATOR;
}
path = path.substr (0, path.length() - 1); // drop final separator