1
0
Fork 0
mirror of https://gitlab.com/niansa/qcommsy.git synced 2025-03-06 20:53:33 +01:00

Use modern iterator when fetching description

This commit is contained in:
niansa 2020-11-11 15:45:45 +01:00
parent 6f2c9286e2
commit 9b200f79c1

View file

@ -114,7 +114,7 @@ void gumbo_search_by_tag(std::vector<GumboNode *> *elemvect, GumboNode* node, co
}
}
static std::string gumbo_cleantext(GumboNode* node) {
std::string gumbo_cleantext(GumboNode* node) {
if (node->type == GUMBO_NODE_TEXT) {
return std::string(node->v.text.text);
@ -307,8 +307,8 @@ std::string get_post_desc(const std::string& post_url, const std::string& server
// Cencenate occurencies
std::string result_string;
for (auto it = results.begin(); it != results.end(); it++) {
result_string.append(trim(gumbo_cleantext(*it)) + "\n");
for (const auto& result : results) {
result_string.append(trim(gumbo_cleantext(result)) + "\n");
}
// Return first occurence