Remove unused methods in PathScanner
Now that these methods are only a few lines it doesn't make much sense to keep them seeing as they are unused. There are also functions with near identical functionality in pbd/file_utils.h
This commit is contained in:
parent
cde8776e80
commit
b457c938cd
@ -178,40 +178,3 @@ PathScanner::find_files_matching_filter (vector<string>& result,
|
||||
free (pathcopy);
|
||||
return;
|
||||
}
|
||||
|
||||
string
|
||||
PathScanner::find_first (const string &dirpath,
|
||||
const string ®exp,
|
||||
bool match_fullpath,
|
||||
bool return_fullpath)
|
||||
{
|
||||
vector<string> res;
|
||||
|
||||
find_files_matching_regex (res, dirpath, regexp,
|
||||
match_fullpath, return_fullpath, 1);
|
||||
|
||||
if (res.size() == 0) {
|
||||
return string();
|
||||
}
|
||||
|
||||
return res.front();
|
||||
}
|
||||
|
||||
string
|
||||
PathScanner::find_first (const string &dirpath,
|
||||
bool (*filter)(const string &, void *),
|
||||
void * /*arg*/,
|
||||
bool match_fullpath,
|
||||
bool return_fullpath)
|
||||
{
|
||||
vector<string> res;
|
||||
|
||||
find_files_matching_filter (res, dirpath, filter, 0,
|
||||
match_fullpath, return_fullpath, 1);
|
||||
|
||||
if (res.size() == 0) {
|
||||
return string();
|
||||
}
|
||||
|
||||
return res.front();
|
||||
}
|
||||
|
@ -55,18 +55,7 @@ class LIBPBD_API PathScanner
|
||||
bool return_fullpath = true,
|
||||
long limit = -1,
|
||||
bool recurse = false);
|
||||
|
||||
std::string find_first (const std::string &dirpath,
|
||||
const std::string ®exp,
|
||||
bool match_fullpath = true,
|
||||
bool return_fullpath = true);
|
||||
|
||||
std::string find_first (const std::string &dirpath,
|
||||
bool (*filter)(const std::string &, void *),
|
||||
void *arg,
|
||||
bool match_fullpath = true,
|
||||
bool return_fullpath = true);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
void find_files_matching_regex (std::vector<std::string>& results,
|
||||
|
Loading…
Reference in New Issue
Block a user