Skip to content

Commit

Permalink
Do not specify default arguments in lambda
Browse files Browse the repository at this point in the history
This becomes available with C++14.
  • Loading branch information
Minoru committed Feb 17, 2024
1 parent 7b32725 commit 553e356
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/itemrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ void prepare_header(
{
const auto add_line =
[&lines]
(const std::string& value,
const std::string& name,
LineType lineType = LineType::wrappable) {
(const std::string& value, const std::string& name, LineType lineType) {
if (!value.empty()) {
const auto line = strprintf::fmt("%s%s", name, value);
lines.push_back(std::make_pair(lineType, line));
Expand All @@ -71,14 +69,14 @@ void prepare_header(
};

const std::string feedtitle = item_renderer::get_feedtitle(item);
add_line(stfl_quote_if_needed(feedtitle), _("Feed: "));
add_line(stfl_quote_if_needed(feedtitle), _("Feed: "), LineType::wrappable);
add_line(stfl_quote_if_needed(utils::utf8_to_locale(item->title())),
_("Title: "));
_("Title: "), LineType::wrappable);
add_line(stfl_quote_if_needed(utils::utf8_to_locale(item->author())),
_("Author: "));
add_line(item->pubDate(), _("Date: "));
_("Author: "), LineType::wrappable);
add_line(item->pubDate(), _("Date: "), LineType::wrappable);
add_line(item->link(), _("Link: "), LineType::softwrappable);
add_line(item->flags(), _("Flags: "));
add_line(item->flags(), _("Flags: "), LineType::wrappable);

const bool could_be_podcast = item->enclosure_type().empty()
|| utils::is_valid_podcast_type(item->enclosure_type());
Expand Down

0 comments on commit 553e356

Please sign in to comment.