From 9a3fb420d7df5d260f454693d12ed58d654b8679 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sat, 28 Dec 2019 06:48:35 +0100 Subject: [PATCH] Begin with the oldest item. --- src/document.cpp | 2 +- src/document.hpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/document.cpp b/src/document.cpp index 0d54260..6456823 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -175,7 +175,7 @@ void Document::parse_rss(const pt::ptree &tree) item.guid = move(guid); item.link = rssitem.get("link"); item.title = move(title); - new_items.push_back(item); + new_items.push_front(item); BOOST_LOG_TRIVIAL(debug) << "Found GUID: " << item.guid; } diff --git a/src/document.hpp b/src/document.hpp index 7a9c422..0da2092 100644 --- a/src/document.hpp +++ b/src/document.hpp @@ -23,13 +23,13 @@ #include #include -#include +#include namespace mastorss { namespace pt = boost::property_tree; using std::string; -using std::vector; +using std::list; /*! * @brief An Item of a feed. @@ -59,7 +59,7 @@ public: Document(Document &&other) = default; Document &operator=(Document &&other) = delete; - vector new_items; + list new_items; void download(); void download(const string &uri);