diff options
Diffstat (limited to 'libs/pbd/search_path.cc')
-rw-r--r-- | libs/pbd/search_path.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/pbd/search_path.cc b/libs/pbd/search_path.cc index d1dc8c39f0..46292ef1f3 100644 --- a/libs/pbd/search_path.cc +++ b/libs/pbd/search_path.cc @@ -163,6 +163,17 @@ Searchpath::add_subdirectory_to_paths (const string& subdir) return *this; } +bool +Searchpath::contains (const string& path) const +{ + std::vector<std::string>::const_iterator i = find(begin(), end(), path); + + if (i == end()) { + return false; + } + return true; +} + /* This is not part of the Searchpath object, but is closely related to the * whole idea, and we put it here for convenience. */ |