mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
Remove limit parameter from PBD::find_files_matching_regex
This limit was not used or documented. The same functionality can be performed when iterating through the results.
This commit is contained in:
parent
0189ad7e29
commit
56337eade4
4 changed files with 5 additions and 9 deletions
|
|
@ -2053,7 +2053,7 @@ AUPlugin::find_presets ()
|
||||||
|
|
||||||
user_preset_map.clear ();
|
user_preset_map.clear ();
|
||||||
|
|
||||||
find_files_matching_filter (preset_files, preset_search_path, au_preset_filter, this, true, true, -1, true);
|
find_files_matching_filter (preset_files, preset_search_path, au_preset_filter, this, true, true, true);
|
||||||
|
|
||||||
if (preset_files.empty()) {
|
if (preset_files.empty()) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ PannerManager::discover_panners ()
|
||||||
|
|
||||||
DEBUG_TRACE (DEBUG::Panning, string_compose (_("looking for panners in %1\n"), search_path));
|
DEBUG_TRACE (DEBUG::Panning, string_compose (_("looking for panners in %1\n"), search_path));
|
||||||
|
|
||||||
find_files_matching_filter (panner_modules, search_path, panner_filter, 0, false, true, 1, true);
|
find_files_matching_filter (panner_modules, search_path, panner_filter, 0, false, true, true);
|
||||||
|
|
||||||
for (vector<std::string>::iterator i = panner_modules.begin(); i != panner_modules.end(); ++i) {
|
for (vector<std::string>::iterator i = panner_modules.begin(); i != panner_modules.end(); ++i) {
|
||||||
panner_discover (*i);
|
panner_discover (*i);
|
||||||
|
|
|
||||||
|
|
@ -227,7 +227,7 @@ find_files_matching_regex (vector<string>& result,
|
||||||
|
|
||||||
find_files_matching_filter (result, dirpath,
|
find_files_matching_filter (result, dirpath,
|
||||||
regexp_filter, &compiled_pattern,
|
regexp_filter, &compiled_pattern,
|
||||||
true, true, -1, false);
|
true, true, false);
|
||||||
|
|
||||||
regfree (&compiled_pattern);
|
regfree (&compiled_pattern);
|
||||||
}
|
}
|
||||||
|
|
@ -238,7 +238,6 @@ find_files_matching_filter (vector<string>& result,
|
||||||
bool (*filter)(const string &, void *),
|
bool (*filter)(const string &, void *),
|
||||||
void *arg,
|
void *arg,
|
||||||
bool match_fullpath, bool return_fullpath,
|
bool match_fullpath, bool return_fullpath,
|
||||||
long limit,
|
|
||||||
bool recurse)
|
bool recurse)
|
||||||
{
|
{
|
||||||
DIR *dir;
|
DIR *dir;
|
||||||
|
|
@ -277,7 +276,7 @@ find_files_matching_filter (vector<string>& result,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (statbuf.st_mode & S_IFDIR && recurse) {
|
if (statbuf.st_mode & S_IFDIR && recurse) {
|
||||||
find_files_matching_filter (result, fullpath, filter, arg, match_fullpath, return_fullpath, limit, recurse);
|
find_files_matching_filter (result, fullpath, filter, arg, match_fullpath, return_fullpath, recurse);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (match_fullpath) {
|
if (match_fullpath) {
|
||||||
|
|
@ -295,13 +294,11 @@ find_files_matching_filter (vector<string>& result,
|
||||||
} else {
|
} else {
|
||||||
result.push_back(finfo->d_name);
|
result.push_back(finfo->d_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
nfound++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
closedir (dir);
|
closedir (dir);
|
||||||
|
|
||||||
} while ((limit < 0 || (nfound < limit)) && (thisdir = strtok_r (0, G_SEARCHPATH_SEPARATOR_S, &saveptr)));
|
} while ((thisdir = strtok_r (0, G_SEARCHPATH_SEPARATOR_S, &saveptr)));
|
||||||
|
|
||||||
free (pathcopy);
|
free (pathcopy);
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,6 @@ find_files_matching_filter (std::vector<std::string>&,
|
||||||
void *arg,
|
void *arg,
|
||||||
bool match_fullpath,
|
bool match_fullpath,
|
||||||
bool return_fullpath,
|
bool return_fullpath,
|
||||||
long limit = -1,
|
|
||||||
bool recurse = false);
|
bool recurse = false);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue