summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-06-17 08:09:00 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-06-17 08:09:00 -0400
commit472d0ad2c62f6c3e730981ffa55ae14159d87f74 (patch)
tree1cc8e751d6e36c4b44a1f1a79b159a2ed9ba59df /gtk2_ardour
parente41bd05073188020fd45e987686c4065fea85f8e (diff)
parent3aa2a4ac8c046b548792dffb9032953d5d5211e2 (diff)
Merge branch 'pathscanner-refactor' of https://github.com/mojofunk/ardour into cairocanvas
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/ardour_ui.cc7
-rw-r--r--gtk2_ardour/session_dialog.cc8
2 files changed, 7 insertions, 8 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index 3ad33b5c8c..d9ac37e36f 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -1416,7 +1416,7 @@ ARDOUR_UI::redisplay_recent_sessions ()
get_state_files_in_directory (*i, state_file_paths);
- vector<string*>* states;
+ vector<string> states;
vector<const gchar*> item;
string fullpath = *i;
@@ -1433,13 +1433,12 @@ ARDOUR_UI::redisplay_recent_sessions ()
}
/* now get available states for this session */
+ states = Session::possible_states (fullpath);
- if ((states = Session::possible_states (fullpath)) == 0) {
+ if (states.empty()) {
/* no state file? */
continue;
}
- vector_delete(states);
- delete(states);
std::vector<string> state_file_names(get_file_names_no_extension (state_file_paths));
diff --git a/gtk2_ardour/session_dialog.cc b/gtk2_ardour/session_dialog.cc
index 178fcb835c..7fb765e2bc 100644
--- a/gtk2_ardour/session_dialog.cc
+++ b/gtk2_ardour/session_dialog.cc
@@ -621,7 +621,7 @@ SessionDialog::redisplay_recent_sessions ()
get_state_files_in_directory (*i, state_file_paths);
- vector<string*>* states;
+ vector<string> states;
vector<const gchar*> item;
string dirname = *i;
@@ -639,12 +639,12 @@ SessionDialog::redisplay_recent_sessions ()
/* now get available states for this session */
- if ((states = Session::possible_states (dirname)) == 0) {
+ states = Session::possible_states (dirname);
+
+ if (states.empty()) {
/* no state file? */
continue;
}
- vector_delete (states);
- delete (states);
std::vector<string> state_file_names(get_file_names_no_extension (state_file_paths));