From 8ddd12a60d08d895cb5400013cdda2e893fb81bb Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Thu, 15 Aug 2013 20:04:08 +1000 Subject: Rename SearchPath class Searchpath Windows headers define SearchPath which means we have to undefine it where necessary. This is a pain and can be tricksy, so I feel renaming the class slightly is the easiest solution. --- libs/pbd/search_path.cc | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'libs/pbd/search_path.cc') diff --git a/libs/pbd/search_path.cc b/libs/pbd/search_path.cc index e56e22fee3..ea08785f68 100644 --- a/libs/pbd/search_path.cc +++ b/libs/pbd/search_path.cc @@ -37,12 +37,12 @@ const char * const path_delimiter = ":"; namespace PBD { -SearchPath::SearchPath () +Searchpath::Searchpath () { } -SearchPath::SearchPath (const string& path) +Searchpath::Searchpath (const string& path) { vector tmp; @@ -51,13 +51,13 @@ SearchPath::SearchPath (const string& path) } } -SearchPath::SearchPath (const vector& paths) +Searchpath::Searchpath (const vector& paths) { add_directories (paths); } void -SearchPath::add_directory (const std::string& directory_path) +Searchpath::add_directory (const std::string& directory_path) { if (!directory_path.empty()) { push_back(directory_path); @@ -65,7 +65,7 @@ SearchPath::add_directory (const std::string& directory_path) } void -SearchPath::add_directories (const vector& paths) +Searchpath::add_directories (const vector& paths) { for(vector::const_iterator i = paths.begin(); i != paths.end(); ++i) { add_directory (*i); @@ -73,7 +73,7 @@ SearchPath::add_directories (const vector& paths) } const string -SearchPath::to_string () const +Searchpath::to_string () const { string path; @@ -87,37 +87,37 @@ SearchPath::to_string () const return path; } -SearchPath& -SearchPath::operator+= (const SearchPath& spath) +Searchpath& +Searchpath::operator+= (const Searchpath& spath) { insert(end(), spath.begin(), spath.end()); return *this; } -SearchPath& -SearchPath::operator+= (const std::string& directory_path) +Searchpath& +Searchpath::operator+= (const std::string& directory_path) { add_directory (directory_path); return *this; } -SearchPath& -SearchPath::operator+ (const std::string& directory_path) +Searchpath& +Searchpath::operator+ (const std::string& directory_path) { add_directory (directory_path); return *this; } -SearchPath& -SearchPath::operator+ (const SearchPath& spath) +Searchpath& +Searchpath::operator+ (const Searchpath& spath) { - // concatenate paths into new SearchPath + // concatenate paths into new Searchpath insert(end(), spath.begin(), spath.end()); return *this; } -SearchPath& -SearchPath::add_subdirectory_to_paths (const string& subdir) +Searchpath& +Searchpath::add_subdirectory_to_paths (const string& subdir) { for (vector::iterator i = begin(); i != end(); ++i) { // should these new paths just be added to the end of -- cgit v1.2.3