[gnote] Replace std::list with std::vector in UriList



commit a27c01f79de288f885980d4cc4cf211842fabd71
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Mon Apr 22 11:41:52 2019 +0300

    Replace std::list with std::vector in UriList

 src/utils.cpp | 5 ++++-
 src/utils.hpp | 4 ++--
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/utils.cpp b/src/utils.cpp
index 9e5f0d85..deac9ebc 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -530,8 +530,9 @@ namespace gnote {
     }
 
 
-    void UriList::get_local_paths(std::list<Glib::ustring> & paths) const
+    std::vector<Glib::ustring> UriList::get_local_paths() const
     {
+      std::vector<Glib::ustring> paths;
       for(const_iterator iter = begin(); iter != end(); ++iter) {
 
         const sharp::Uri & uri(*iter);
@@ -540,6 +541,8 @@ namespace gnote {
           paths.push_back(uri.local_path());
         }
       }
+
+      return paths;
     }
 
 
diff --git a/src/utils.hpp b/src/utils.hpp
index d2480796..93e90d35 100644
--- a/src/utils.hpp
+++ b/src/utils.hpp
@@ -126,14 +126,14 @@ namespace gnote {
 
 
     class UriList
-      : public std::list<sharp::Uri>
+      : public std::vector<sharp::Uri>
     {
     public:
 //      UriList(const NoteList & notes);
       UriList(const Glib::ustring & data);
       UriList(const Gtk::SelectionData & selection);
       Glib::ustring to_string() const;
-      void get_local_paths(std::list<Glib::ustring> &) const;
+      std::vector<Glib::ustring> get_local_paths() const;
       
     private:
       void load_from_string(const Glib::ustring & data);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]