From: Vsevolod Stakhov Date: Sun, 19 Jun 2022 12:01:10 +0000 (+0100) Subject: [Minor] C++20 is here X-Git-Tag: 3.3~184 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48ce799a7a5cf1bde8440e3e75a677ee3e467c9d;p=thirdparty%2Frspamd.git [Minor] C++20 is here --- diff --git a/src/client/rspamc.cxx b/src/client/rspamc.cxx index 6060b621f4..d9a1c2dea1 100644 --- a/src/client/rspamc.cxx +++ b/src/client/rspamc.cxx @@ -418,12 +418,6 @@ static const auto sort_map = frozen::make_unordered_map bool { - return inp.size() >= suffix.size() && inp.compare(inp.size() - suffix.size(), std::string_view::npos, suffix) == 0; -} - template auto sort_ucl_container_with_default(T &cont, const char *default_sort, typename std::enable_if>::type* = 0) -> void @@ -433,7 +427,7 @@ auto sort_ucl_container_with_default(T &cont, const char *default_sort, auto sort_view = std::string_view{real_sort}; auto inverse = false; - if (sv_ends_with(sort_view, ":asc")) { + if (sort_view.ends_with(":asc")) { inverse = true; sort_view = std::string_view{sort, strlen(sort) - sizeof(":asc") + 1}; }