summaryrefslogtreecommitdiff
path: root/libs/pbd/file_utils.cc
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2014-06-19 13:24:34 +1000
committerPaul Davis <paul@linuxaudiosystems.com>2014-06-25 12:40:10 -0400
commit56337eade47d62001fe4a9ce85e170ac26f2c1cf (patch)
treea49121caccfb696c9c9ccf84d0d01211ec27d578 /libs/pbd/file_utils.cc
parent0189ad7e29c4293af1f161ae229835f7e57bd0ae (diff)
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.
Diffstat (limited to 'libs/pbd/file_utils.cc')
-rw-r--r--libs/pbd/file_utils.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/libs/pbd/file_utils.cc b/libs/pbd/file_utils.cc
index 7dd65e8bc4..8348049c8f 100644
--- a/libs/pbd/file_utils.cc
+++ b/libs/pbd/file_utils.cc
@@ -227,7 +227,7 @@ find_files_matching_regex (vector<string>& result,
find_files_matching_filter (result, dirpath,
regexp_filter, &compiled_pattern,
- true, true, -1, false);
+ true, true, false);
regfree (&compiled_pattern);
}
@@ -238,7 +238,6 @@ find_files_matching_filter (vector<string>& result,
bool (*filter)(const string &, void *),
void *arg,
bool match_fullpath, bool return_fullpath,
- long limit,
bool recurse)
{
DIR *dir;
@@ -277,7 +276,7 @@ find_files_matching_filter (vector<string>& result,
}
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 {
if (match_fullpath) {
@@ -295,13 +294,11 @@ find_files_matching_filter (vector<string>& result,
} else {
result.push_back(finfo->d_name);
}
-
- nfound++;
}
}
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);
return;