Skip to content

Commit

Permalink
html-to-text: be explicit with array type
Browse files Browse the repository at this point in the history
clang in CI fails to deduce it, so let's help it a bit.
  • Loading branch information
djcb committed Jul 26, 2023
1 parent 275859a commit c06e765
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/utils/mu-html-to-text.cc
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ comment(Context& ctx)
static bool // do we need a SPC separator for this tag?
needs_separator(std::string_view tagname)
{
constexpr std::array nosep_tags = {
constexpr std::array<const char*, 7> nosep_tags = {
"b", "em", "i", "s", "strike", "tt", "u"
};
return !seq_some(nosep_tags, [&](auto&& t){return matches(tagname, t);});
Expand All @@ -343,7 +343,7 @@ needs_separator(std::string_view tagname)
static bool // do we need to skip the element completely?
is_skip_element(std::string_view tagname)
{
constexpr std::array skip_tags = {
constexpr std::array<const char*, 4> skip_tags = {
"script", "style", "head", "meta"
};
return seq_some(skip_tags, [&](auto&& t){return matches(tagname, t);});
Expand Down Expand Up @@ -422,7 +422,7 @@ html_escape_char(Context& ctx)
{
// we only care about a few accented chars, and add them unaccented, lowercase, since that's
// we do for indexing anyway.
constexpr std::array escs = {
constexpr std::array<const char*, 11> escs = {
"breve",
"caron",
"circ",
Expand Down

0 comments on commit c06e765

Please sign in to comment.