diff options
author | Carl Hetherington <carl@carlh.net> | 2011-02-17 14:05:21 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-02-17 14:05:21 +0000 |
commit | 7ae7416cc585a8fb27740f1fecf0ce54fe0b4535 (patch) | |
tree | ffceeb98b90319f69395758630006b5ee19db2f7 /libs/ardour/session_state.cc | |
parent | fee370943854ff99aba1794382b6700b9feeb751 (diff) |
Minor cleanups.
git-svn-id: svn://localhost/ardour2/branches/3.0@8879 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r-- | libs/ardour/session_state.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 675c7e679c..9a359e1b05 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -523,7 +523,6 @@ Session::ensure_subdirs () int Session::create (const string& mix_template, BusProfile* bus_profile) { - if (g_mkdir_with_parents (_path.c_str(), 0755) < 0) { error << string_compose(_("Session: cannot create session folder \"%1\" (%2)"), _path, strerror (errno)) << endmsg; return -1; @@ -538,14 +537,14 @@ Session::create (const string& mix_template, BusProfile* bus_profile) ifstream in(in_path.c_str()); - if (in){ + if (in) { string out_path = _path; out_path += _name; out_path += statefile_suffix; ofstream out(out_path.c_str()); - if (out){ + if (out) { out << in.rdbuf(); _is_new = false; return 0; @@ -1216,7 +1215,7 @@ Session::set_state (const XMLNode& node, int version) _state_of_the_state = StateOfTheState (_state_of_the_state|CannotSave); - if (node.name() != X_("Session")){ + if (node.name() != X_("Session")) { fatal << _("programming error: Session: incorrect XML node sent to set_state()") << endmsg; return -1; } @@ -2009,7 +2008,7 @@ Session::save_template (string template_name) } if (!tree.write (template_file_path.to_string())) { - error << _("mix template not saved") << endmsg; + error << _("template not saved") << endmsg; return -1; } @@ -2588,7 +2587,7 @@ Session::cleanup_regions () uint32_t used = playlists->region_use_count (audio_region); - if (used == 0 && !audio_region->automatic()){ + if (used == 0 && !audio_region->automatic()) { RegionFactory::map_remove(i->second); } } |