Move PathScanner::operator() into header
authorTim Mayberry <mojofunk@gmail.com>
Tue, 17 Jun 2014 01:48:46 +0000 (11:48 +1000)
committerTim Mayberry <mojofunk@gmail.com>
Tue, 17 Jun 2014 11:14:13 +0000 (21:14 +1000)
libs/pbd/pathscanner.cc
libs/pbd/pbd/pathscanner.h

index fee1ffc84cdb9efde4c8bcc5c6270462407aa83b..a320ec8d54deadddd4019e87114c2c37650caeb7 100644 (file)
@@ -85,24 +85,6 @@ PathScanner::find_files_matching_regex (vector<string>& result,
 
        regfree (&compiled_pattern);
 }
-
-vector<string>
-PathScanner::operator() (const string &dirpath, const string &regexp,
-                        bool match_fullpath, bool return_fullpath,
-                        long limit, bool recurse)
-
-{
-       vector<string> result;
-
-       find_files_matching_regex (result,
-                       dirpath,
-                       regexp,
-                       match_fullpath,
-                       return_fullpath,
-                       limit, recurse);
-
-       return result;
-}      
        
 void
 PathScanner::find_files_matching_filter (vector<string>& result,
index a3a2b762377fa232bc8f270638422b1696f0a8c5..d9522affe307f0402cd5d32ccbcc127c3200d404 100644 (file)
@@ -54,7 +54,19 @@ class LIBPBD_API PathScanner
                                             bool match_fullpath = true,
                                             bool return_fullpath = true,
                                             long limit = -1,
-                                            bool recurse = false);
+                                            bool recurse = false)
+       {
+               std::vector<std::string> result;
+
+               find_files_matching_regex (result,
+                                          dirpath,
+                                          regexp,
+                                          match_fullpath,
+                                          return_fullpath,
+                                          limit, recurse);
+
+               return result;
+       }
 
   private: