projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace all use of PathScanner with equivalent functions from pbd/file_utils.h
[ardour.git]
/
libs
/
ardour
/
audio_unit.cc
diff --git
a/libs/ardour/audio_unit.cc
b/libs/ardour/audio_unit.cc
index 9e461c63466515cfa63aff5d12384b7b1f8083e0..5423fc168845ad67e0f3c1b950229ae6cc389496 100644
(file)
--- a/
libs/ardour/audio_unit.cc
+++ b/
libs/ardour/audio_unit.cc
@@
-28,7
+28,7
@@
#include "pbd/xml++.h"
#include "pbd/convert.h"
#include "pbd/whitespace.h"
#include "pbd/xml++.h"
#include "pbd/convert.h"
#include "pbd/whitespace.h"
-#include "pbd/
pathscanner
.h"
+#include "pbd/
file_utils
.h"
#include "pbd/locale_guard.h"
#include <glibmm/threads.h>
#include "pbd/locale_guard.h"
#include <glibmm/threads.h>
@@
-2049,20
+2049,19
@@
AUPlugin::current_preset() const
void
AUPlugin::find_presets ()
{
void
AUPlugin::find_presets ()
{
- vector<string*>* preset_files;
- PathScanner scanner;
+ vector<string> preset_files;
user_preset_map.clear ();
user_preset_map.clear ();
-
preset_files = scanner (
preset_search_path, au_preset_filter, this, true, true, -1, true);
+
find_files_matching_filter (preset_files,
preset_search_path, au_preset_filter, this, true, true, -1, true);
- if (
!preset_files
) {
+ if (
preset_files.empty()
) {
return;
}
return;
}
- for (vector<string
*>::iterator x = preset_files->begin(); x != preset_files->
end(); ++x) {
+ for (vector<string
>::iterator x = preset_files.begin(); x != preset_files.
end(); ++x) {
- string path = *
(*x)
;
+ string path = *
x
;
string preset_name;
/* make an initial guess at the preset name using the path */
string preset_name;
/* make an initial guess at the preset name using the path */
@@
-2079,11
+2078,8
@@
AUPlugin::find_presets ()
user_preset_map[preset_name] = path;
}
user_preset_map[preset_name] = path;
}
- delete *x;
}
}
- delete preset_files;
-
/* now fill the vector<string> with the names we have */
for (UserPresetMap::iterator i = user_preset_map.begin(); i != user_preset_map.end(); ++i) {
/* now fill the vector<string> with the names we have */
for (UserPresetMap::iterator i = user_preset_map.begin(); i != user_preset_map.end(); ++i) {