From 0189ad7e29c4293af1f161ae229835f7e57bd0ae Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Thu, 19 Jun 2014 12:58:49 +1000 Subject: [PATCH] Remove parameters from PBD::find_files_matching_regex The only users of this API always used the same options so just remove them. --- libs/ardour/plugin_manager.cc | 12 ++++++------ libs/pbd/file_utils.cc | 8 ++------ libs/pbd/pbd/file_utils.h | 6 +----- 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/libs/ardour/plugin_manager.cc b/libs/ardour/plugin_manager.cc index 7399d30f89..0684009935 100644 --- a/libs/ardour/plugin_manager.cc +++ b/libs/ardour/plugin_manager.cc @@ -242,7 +242,7 @@ PluginManager::clear_vst_cache () #ifdef WINDOWS_VST_SUPPORT { vector fsi_files; - find_files_matching_regex (fsi_files, Config->get_plugin_path_vst(), "\\.fsi$", true, true, -1, false); + find_files_matching_regex (fsi_files, Config->get_plugin_path_vst(), "\\.fsi$"); for (vector::iterator i = fsi_files.begin(); i != fsi_files.end (); ++i) { ::g_unlink(i->c_str()); } @@ -252,7 +252,7 @@ PluginManager::clear_vst_cache () #ifdef LXVST_SUPPORT { vector fsi_files; - find_files_matching_regex (fsi_files, Config->get_plugin_path_lxvst(), "\\.fsi$", true, true, -1, false); + find_files_matching_regex (fsi_files, Config->get_plugin_path_lxvst(), "\\.fsi$"); for (vector::iterator i = fsi_files.begin(); i != fsi_files.end (); ++i) { ::g_unlink(i->c_str()); } @@ -263,7 +263,7 @@ PluginManager::clear_vst_cache () { string personal = get_personal_vst_info_cache_dir(); vector fsi_files; - find_files_matching_regex (fsi_files, personal, "\\.fsi$", true, true, -1, false); + find_files_matching_regex (fsi_files, personal, "\\.fsi$"); for (vector::iterator i = fsi_files.begin(); i != fsi_files.end (); ++i) { ::g_unlink(i->c_str()); } @@ -277,7 +277,7 @@ PluginManager::clear_vst_blacklist () #ifdef WINDOWS_VST_SUPPORT { vector fsi_files; - find_files_matching_regex (fsi_files, Config->get_plugin_path_vst(), "\\.fsb$", true, true, -1, false); + find_files_matching_regex (fsi_files, Config->get_plugin_path_vst(), "\\.fsb$"); for (vector::iterator i = fsi_files.begin(); i != fsi_files.end (); ++i) { ::g_unlink(i->c_str()); } @@ -287,7 +287,7 @@ PluginManager::clear_vst_blacklist () #ifdef LXVST_SUPPORT { vector fsi_files; - find_files_matching_regex (fsi_files, Config->get_plugin_path_lxvst(), "\\.fsb$", true, true, -1, false); + find_files_matching_regex (fsi_files, Config->get_plugin_path_lxvst(), "\\.fsb$"); for (vector::iterator i = fsi_files.begin(); i != fsi_files.end (); ++i) { ::g_unlink(i->c_str()); } @@ -299,7 +299,7 @@ PluginManager::clear_vst_blacklist () string personal = get_personal_vst_blacklist_dir(); vector fsi_files; - find_files_matching_regex (fsi_files, personal, "\\.fsb$", true, true, -1, false); + find_files_matching_regex (fsi_files, personal, "\\.fsb$"); for (vector::iterator i = fsi_files.begin(); i != fsi_files.end (); ++i) { ::g_unlink(i->c_str()); } diff --git a/libs/pbd/file_utils.cc b/libs/pbd/file_utils.cc index 6e81a213f5..7dd65e8bc4 100644 --- a/libs/pbd/file_utils.cc +++ b/libs/pbd/file_utils.cc @@ -205,10 +205,7 @@ regexp_filter (const string& str, void *arg) void find_files_matching_regex (vector& result, const std::string& dirpath, - const std::string& regexp, - bool match_fullpath, bool return_fullpath, - long limit, - bool recurse) + const std::string& regexp) { int err; char msg[256]; @@ -230,8 +227,7 @@ find_files_matching_regex (vector& result, find_files_matching_filter (result, dirpath, regexp_filter, &compiled_pattern, - match_fullpath, return_fullpath, - limit, recurse); + true, true, -1, false); regfree (&compiled_pattern); } diff --git a/libs/pbd/pbd/file_utils.h b/libs/pbd/pbd/file_utils.h index 151d177275..2ae26f801e 100644 --- a/libs/pbd/pbd/file_utils.h +++ b/libs/pbd/pbd/file_utils.h @@ -115,11 +115,7 @@ find_file_in_search_path (const Searchpath& search_path, LIBPBD_API void find_files_matching_regex (std::vector& results, const std::string& dirpath, - const std::string& regexp, - bool match_fullpath, - bool return_fullpath, - long limit = -1, - bool recurse = false); + const std::string& regexp); /** * @return files in dirpath that match a supplied filter(functor)