From 189071eae2b94339dde9ab694388910a1afb525c Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Tue, 4 Sep 2007 05:26:34 +0000 Subject: [PATCH] Remove unused functions Session::possible_states git-svn-id: svn://localhost/ardour2/trunk@2390 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/ardour/session.h | 3 --- libs/ardour/session_state.cc | 50 ------------------------------------ 2 files changed, 53 deletions(-) diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 9cfdf1187e..d57a0d0a8d 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -426,9 +426,6 @@ class Session : public PBD::StatefulDestructible sigc::signal StateSaved; sigc::signal StateReady; - vector* possible_states() const; - static vector* possible_states(string path); - XMLNode& get_state(); int set_state(const XMLNode& node); // not idempotent XMLNode& get_template(); diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 0268d4b564..45d07e2715 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -1915,56 +1915,6 @@ Session::load_route_groups (const XMLNode& node, bool edit) return 0; } -static bool -state_file_filter (const string &str, void *arg) -{ - return (str.length() > strlen(statefile_suffix) && - str.find (statefile_suffix) == (str.length() - strlen (statefile_suffix))); -} - -struct string_cmp { - bool operator()(const string* a, const string* b) { - return *a < *b; - } -}; - -static string* -remove_end(string* state) -{ - string statename(*state); - - string::size_type start,end; - if ((start = statename.find_last_of ('/')) != string::npos) { - statename = statename.substr (start+1); - } - - if ((end = statename.rfind(".ardour")) == string::npos) { - end = statename.length(); - } - - return new string(statename.substr (0, end)); -} - -vector * -Session::possible_states (string path) -{ - PathScanner scanner; - vector* states = scanner (path, state_file_filter, 0, false, false); - - transform(states->begin(), states->end(), states->begin(), remove_end); - - string_cmp cmp; - sort (states->begin(), states->end(), cmp); - - return states; -} - -vector * -Session::possible_states () const -{ - return possible_states(_path); -} - void Session::auto_save() {