Remove parameters from PBD::find_files_matching_regex
authorTim Mayberry <mojofunk@gmail.com>
Thu, 19 Jun 2014 02:58:49 +0000 (12:58 +1000)
committerPaul Davis <paul@linuxaudiosystems.com>
Wed, 25 Jun 2014 16:40:09 +0000 (12:40 -0400)
The only users of this API always used the same options so just remove
them.

libs/ardour/plugin_manager.cc
libs/pbd/file_utils.cc
libs/pbd/pbd/file_utils.h

index 7399d30f89f890e946b7d996def982f0aa5c4d45..0684009935183af2c4f82f0d27c432945ee44541 100644 (file)
@@ -242,7 +242,7 @@ PluginManager::clear_vst_cache ()
 #ifdef WINDOWS_VST_SUPPORT
        {
                vector<string> 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<string>::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<string> 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<string>::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<string> fsi_files;
-               find_files_matching_regex (fsi_files, personal, "\\.fsi$", true, true, -1, false);
+               find_files_matching_regex (fsi_files, personal, "\\.fsi$");
                for (vector<string>::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<string> 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<string>::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<string> 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<string>::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<string> fsi_files;
-               find_files_matching_regex (fsi_files, personal, "\\.fsb$", true, true, -1, false);
+               find_files_matching_regex (fsi_files, personal, "\\.fsb$");
                for (vector<string>::iterator i = fsi_files.begin(); i != fsi_files.end (); ++i) {
                        ::g_unlink(i->c_str());
                }
index 6e81a213f5f41359e993f4189f5ea75bf8860c98..7dd65e8bc4193c91b7f8d894757189a6d19a6d75 100644 (file)
@@ -205,10 +205,7 @@ regexp_filter (const string& str, void *arg)
 void
 find_files_matching_regex (vector<string>& 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<string>& result,
 
        find_files_matching_filter (result, dirpath,
                                    regexp_filter, &compiled_pattern,
-                                   match_fullpath, return_fullpath,
-                                   limit, recurse);
+                                   true, true, -1, false);
 
        regfree (&compiled_pattern);
 }
index 151d177275f414a7c156e145a891abc675dda45f..2ae26f801e0179f2f2d0dce1df15915b5d047fe0 100644 (file)
@@ -115,11 +115,7 @@ find_file_in_search_path (const Searchpath& search_path,
 LIBPBD_API void
 find_files_matching_regex (std::vector<std::string>& 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)