Fix some initializations.

This commit is contained in:
tastytea 2019-12-28 06:27:56 +01:00
parent ebf5a2cd00
commit 8b0c2500f9
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07

View File

@ -146,7 +146,7 @@ void Document::parse_rss(const pt::ptree &tree)
} }
bool skipthis{false}; bool skipthis{false};
string title = rssitem.get<string>("title"); string title{rssitem.get<string>("title")};
for (const auto &skip : _data.skip) for (const auto &skip : _data.skip)
{ {
if (title.substr(0, skip.length()) == skip) if (title.substr(0, skip.length()) == skip)
@ -162,11 +162,10 @@ void Document::parse_rss(const pt::ptree &tree)
} }
Item item; Item item;
item.description = item.description = [&]
[&]
{ {
string desc = string desc
remove_html(rssitem.get<string>("description")); {remove_html(rssitem.get<string>("description"))};
for (const auto &fix : _data.fixes) for (const auto &fix : _data.fixes)
{ {
desc = regex_replace(desc, regex{fix}, ""); desc = regex_replace(desc, regex{fix}, "");