From 3066bd48da29c84e9a491b809c81d512babd869c Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Tue, 17 Jun 2014 11:22:52 +1000 Subject: [PATCH] Remove PathScanner::run_scan and use PathScanner::run_scan_internal directly --- libs/pbd/pathscanner.cc | 23 ++++------------------- libs/pbd/pbd/pathscanner.h | 20 ++++++-------------- 2 files changed, 10 insertions(+), 33 deletions(-) diff --git a/libs/pbd/pathscanner.cc b/libs/pbd/pathscanner.cc index 1a197b27aa..29c339c087 100644 --- a/libs/pbd/pathscanner.cc +++ b/libs/pbd/pathscanner.cc @@ -78,12 +78,10 @@ PathScanner::find_files_matching_regex (vector& 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 ®exp, return result; } - -vector -PathScanner::run_scan (const string &dirpath, - bool (*filter)(const string &, void *), - void *arg, - bool match_fullpath, bool return_fullpath, - long limit, - bool recurse) -{ - vector result; - run_scan_internal (result, dirpath, filter, arg, match_fullpath, return_fullpath, limit, recurse); - return result; -} void PathScanner::run_scan_internal (vector& result, diff --git a/libs/pbd/pbd/pathscanner.h b/libs/pbd/pbd/pathscanner.h index 4d9ef56e15..d97cbb7693 100644 --- a/libs/pbd/pbd/pathscanner.h +++ b/libs/pbd/pbd/pathscanner.h @@ -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 result; + run_scan_internal (result, dirpath, + filter, arg, + match_fullpath, return_fullpath, + limit, recurse); + return result; } std::vector operator() (const std::string &dirpath, @@ -77,14 +77,6 @@ class LIBPBD_API PathScanner long limit, bool recurse = false); - std::vector 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&, const std::string &dirpath, bool (*filter)(const std::string &, void *),