Begin with the oldest item.

This commit is contained in:
tastytea 2019-12-28 06:48:35 +01:00
parent 527c2347ea
commit 9a3fb420d7
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 4 additions and 4 deletions

View File

@ -175,7 +175,7 @@ void Document::parse_rss(const pt::ptree &tree)
item.guid = move(guid); item.guid = move(guid);
item.link = rssitem.get<string>("link"); item.link = rssitem.get<string>("link");
item.title = move(title); item.title = move(title);
new_items.push_back(item); new_items.push_front(item);
BOOST_LOG_TRIVIAL(debug) << "Found GUID: " << item.guid; BOOST_LOG_TRIVIAL(debug) << "Found GUID: " << item.guid;
} }

View File

@ -23,13 +23,13 @@
#include <restclient-cpp/restclient.h> #include <restclient-cpp/restclient.h>
#include <string> #include <string>
#include <vector> #include <list>
namespace mastorss namespace mastorss
{ {
namespace pt = boost::property_tree; namespace pt = boost::property_tree;
using std::string; using std::string;
using std::vector; using std::list;
/*! /*!
* @brief An Item of a feed. * @brief An Item of a feed.
@ -59,7 +59,7 @@ public:
Document(Document &&other) = default; Document(Document &&other) = default;
Document &operator=(Document &&other) = delete; Document &operator=(Document &&other) = delete;
vector<Item> new_items; list<Item> new_items;
void download(); void download();
void download(const string &uri); void download(const string &uri);