Fix incorrect comment in hiliteMatches

This commit is contained in:
Fishhh
2022-06-05 20:30:18 +02:00
parent 1dd7253133
commit d137ceccef
+2 -2
View File
@@ -8,9 +8,9 @@ std::string hiliteMatches(
std::string_view prefix,
std::string_view postfix)
{
// Avoid copy on zero matches
// Avoid extra work on zero matches
if (matches.size() == 0)
return (std::string) s;
return std::string(s);
std::sort(matches.begin(), matches.end(), [](const auto & a, const auto & b) {
return a.position() < b.position();