mirror of
https://gitlab.com/niansa/qcommsy.git
synced 2025-03-06 20:53:33 +01:00
Very minor code style optimisation
This commit is contained in:
parent
eab9d27b0c
commit
f692d1fd15
1 changed files with 7 additions and 7 deletions
|
@ -228,18 +228,18 @@ std::string get_post_meta(GumboNode *node) {
|
|||
return clean_spaces(trim(gumbo_cleantext(metanodes[1])));
|
||||
}
|
||||
|
||||
bool get_post_unread(GumboNode *node) {
|
||||
std::vector<GumboNode *> elems;
|
||||
gumbo_search_by_class(elems, node, "cs-comment-change-info", GUMBO_TAG_DIV);
|
||||
return !elems.empty();
|
||||
}
|
||||
|
||||
std::string get_post_url(GumboNode *node) {
|
||||
std::vector<GumboNode *> titlenodes;
|
||||
gumbo_search_by_class(titlenodes, node, "uk-comment-title", GUMBO_TAG_H4);
|
||||
return gumbo_get_attr(titlenodes[0], "href", GUMBO_TAG_A)[0];
|
||||
}
|
||||
|
||||
bool get_post_unread(GumboNode *node) {
|
||||
std::vector<GumboNode *> elems;
|
||||
gumbo_search_by_class(elems, node, "cs-comment-change-info", GUMBO_TAG_DIV);
|
||||
return !elems.empty();
|
||||
}
|
||||
|
||||
std::vector<std::map<std::string, std::string>> get_post_files(GumboNode *node) {
|
||||
std::vector<GumboNode *> metanodes;
|
||||
std::vector<std::string> fileurls;
|
||||
|
@ -319,8 +319,8 @@ struct commsyPost {
|
|||
std::string id;
|
||||
std::string description;
|
||||
std::string meta;
|
||||
bool unread;
|
||||
std::string url;
|
||||
bool unread;
|
||||
std::vector<commsyFile> files;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue