X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fpbd%2Fsearch_path.cc;h=1d931a546d93b9b83d2bf858bc964cf2523746a4;hb=ea32eecf3d2fa22c87350a3b198f8c13707627c6;hp=44438cc85c9faf78594d57497ecfaf31bc97b65b;hpb=ad017365f7a73f8ba57f667cc1aa36478b48c50e;p=ardour.git diff --git a/libs/pbd/search_path.cc b/libs/pbd/search_path.cc index 44438cc85c..1d931a546d 100644 --- a/libs/pbd/search_path.cc +++ b/libs/pbd/search_path.cc @@ -124,19 +124,16 @@ Searchpath::operator+= (const std::string& directory_path) return *this; } -Searchpath& +const Searchpath Searchpath::operator+ (const std::string& directory_path) { - add_directory (directory_path); - return *this; + return Searchpath (*this) += directory_path; } -Searchpath& +const Searchpath Searchpath::operator+ (const Searchpath& spath) { - // concatenate paths into new Searchpath - insert(end(), spath.begin(), spath.end()); - return *this; + return Searchpath (*this) += spath; } Searchpath&