13
0

Remove unused functions Session::possible_states

git-svn-id: svn://localhost/ardour2/trunk@2390 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Tim Mayberry 2007-09-04 05:26:34 +00:00
parent e2f919d76b
commit 189071eae2
2 changed files with 0 additions and 53 deletions

View File

@ -426,9 +426,6 @@ class Session : public PBD::StatefulDestructible
sigc::signal<void,string> StateSaved;
sigc::signal<void> StateReady;
vector<string*>* possible_states() const;
static vector<string*>* possible_states(string path);
XMLNode& get_state();
int set_state(const XMLNode& node); // not idempotent
XMLNode& get_template();

View File

@ -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<string *> *
Session::possible_states (string path)
{
PathScanner scanner;
vector<string*>* 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<string *> *
Session::possible_states () const
{
return possible_states(_path);
}
void
Session::auto_save()
{