updated .po files (*not* translations, just .po files)
[ardour.git] / libs / ardour / session_state_utils.cc
index b6bd6a958176dfe3c213a7f11606ce8c725e4a03..a8550724136b536ca278200649a5184908baee31 100644 (file)
@@ -1,5 +1,5 @@
 /*
-       Copyright (C) 2007 Tim Mayberry 
+       Copyright (C) 2007 Tim Mayberry
 
        This program is free software; you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-#include <pbd/compose.h>
-#include <pbd/basename.h>
-#include <pbd/error.h>
-#include <pbd/file_utils.h>
+#include <algorithm>
 
-#include <ardour/session_state_utils.h>
-#include <ardour/filename_extensions.h>
+#include "pbd/compose.h"
+#include "pbd/error.h"
+#include "pbd/file_utils.h"
+
+#include "ardour/session_state_utils.h"
+#include "ardour/filename_extensions.h"
 
 #include "i18n.h"
 
+using namespace std;
+using namespace PBD;
+
 namespace ARDOUR {
 
 bool
@@ -51,10 +55,10 @@ create_backup_file (const sys::path & file_path)
 
 void
 get_state_files_in_directory (const sys::path & directory_path,
-               vector<sys::path> & result)
+                             vector<sys::path> & result)
 {
        Glib::PatternSpec state_file_pattern('*' + string(statefile_suffix));
-       
+
        find_matching_files_in_directory (directory_path, state_file_pattern,
                        result);
 }
@@ -64,11 +68,8 @@ get_file_names_no_extension (const vector<sys::path> & file_paths)
 {
        vector<string> result;
 
-       for (vector<sys::path>::const_iterator i = file_paths.begin();
-                       i != file_paths.end(); ++i)
-       {
-               result.push_back (basename_nosuffix((*i).to_string()));
-       }
+       std::transform (file_paths.begin(), file_paths.end(),
+                       std::back_inserter(result), sys::basename);
 
        sort (result.begin(), result.end(), std::less<string>());