13
0

Remove PathScanner::run_scan and use PathScanner::run_scan_internal directly

This commit is contained in:
Tim Mayberry 2014-06-17 11:22:52 +10:00
parent f54092dada
commit 3066bd48da
2 changed files with 10 additions and 33 deletions

View File

@ -78,12 +78,10 @@ PathScanner::find_files_matching_regex (vector<string>& result,
return;
}
result = run_scan (dirpath,
regexp_filter,
&compiled_pattern,
match_fullpath,
return_fullpath,
limit, recurse);
run_scan_internal (result, dirpath,
regexp_filter, &compiled_pattern,
match_fullpath, return_fullpath,
limit, recurse);
regfree (&compiled_pattern);
}
@ -105,19 +103,6 @@ PathScanner::operator() (const string &dirpath, const string &regexp,
return result;
}
vector<string>
PathScanner::run_scan (const string &dirpath,
bool (*filter)(const string &, void *),
void *arg,
bool match_fullpath, bool return_fullpath,
long limit,
bool recurse)
{
vector<string> result;
run_scan_internal (result, dirpath, filter, arg, match_fullpath, return_fullpath, limit, recurse);
return result;
}
void
PathScanner::run_scan_internal (vector<string>& result,

View File

@ -41,12 +41,12 @@ class LIBPBD_API PathScanner
bool return_fullpath = true,
long limit = -1,
bool recurse = false) {
return run_scan (dirpath,
filter,
arg,
match_fullpath,
return_fullpath,
limit, recurse);
std::vector<std::string> result;
run_scan_internal (result, dirpath,
filter, arg,
match_fullpath, return_fullpath,
limit, recurse);
return result;
}
std::vector<std::string> operator() (const std::string &dirpath,
@ -77,14 +77,6 @@ class LIBPBD_API PathScanner
long limit,
bool recurse = false);
std::vector<std::string> run_scan (const std::string &dirpath,
bool (*filter)(const std::string &, void *),
void *arg,
bool match_fullpath,
bool return_fullpath,
long limit,
bool recurse = false);
void run_scan_internal (std::vector<std::string>&,
const std::string &dirpath,
bool (*filter)(const std::string &, void *),