projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
continue with MTC debugging
[ardour.git]
/
libs
/
ardour
/
template_utils.cc
diff --git
a/libs/ardour/template_utils.cc
b/libs/ardour/template_utils.cc
index 3f380c0fd6445f9d72201126ef51f2b510ff7659..aa0a583af4d982771658c92786720ad4108e2448 100644
(file)
--- a/
libs/ardour/template_utils.cc
+++ b/
libs/ardour/template_utils.cc
@@
-12,6
+12,9
@@
#include "ardour/filename_extensions.h"
#include "ardour/io.h"
#include "ardour/filename_extensions.h"
#include "ardour/io.h"
+using namespace std;
+using namespace PBD;
+
namespace ARDOUR {
sys::path
namespace ARDOUR {
sys::path
@@
-61,7
+64,7
@@
user_route_template_directory ()
}
static bool
}
static bool
-template_filter (const string &str, void *
arg
)
+template_filter (const string &str, void *
/*arg*/
)
{
cerr << "Checking into " << str << " using " << template_suffix << endl;
return (str.length() > strlen(template_suffix) &&
{
cerr << "Checking into " << str << " using " << template_suffix << endl;
return (str.length() > strlen(template_suffix) &&
@@
-77,14
+80,14
@@
find_session_templates (vector<TemplateInfo>& template_names)
spath += user_template_directory ();
templates = scanner (spath.to_string(), template_filter, 0, false, true);
spath += user_template_directory ();
templates = scanner (spath.to_string(), template_filter, 0, false, true);
-
+
if (!templates) {
cerr << "Found nothing along " << spath.to_string() << endl;
return;
}
cerr << "Found " << templates->size() << " along " << spath.to_string() << endl;
if (!templates) {
cerr << "Found nothing along " << spath.to_string() << endl;
return;
}
cerr << "Found " << templates->size() << " along " << spath.to_string() << endl;
-
+
for (vector<string*>::iterator i = templates->begin(); i != templates->end(); ++i) {
string fullpath = *(*i);
for (vector<string*>::iterator i = templates->begin(); i != templates->end(); ++i) {
string fullpath = *(*i);
@@
-114,11
+117,11
@@
find_route_templates (vector<TemplateInfo>& template_names)
spath += user_route_template_directory ();
templates = scanner (spath.to_string(), template_filter, 0, false, true);
spath += user_route_template_directory ();
templates = scanner (spath.to_string(), template_filter, 0, false, true);
-
+
if (!templates) {
return;
}
if (!templates) {
return;
}
-
+
for (vector<string*>::iterator i = templates->begin(); i != templates->end(); ++i) {
string fullpath = *(*i);
for (vector<string*>::iterator i = templates->begin(); i != templates->end(); ++i) {
string fullpath = *(*i);
@@
-129,7
+132,7
@@
find_route_templates (vector<TemplateInfo>& template_names)
}
XMLNode* root = tree.root();
}
XMLNode* root = tree.root();
-
+
TemplateInfo rti;
rti.name = IO::name_from_state (*root->children().front());
TemplateInfo rti;
rti.name = IO::name_from_state (*root->children().front());
@@
-138,7
+141,7
@@
find_route_templates (vector<TemplateInfo>& template_names)
template_names.push_back (rti);
}
template_names.push_back (rti);
}
-
free (templates)
;
+
delete templates
;
}
}
}
}