aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFishhh <hubert.gluchowski19@gmail.com>2022-06-05 18:44:37 +0200
committerFishhh <hubert.gluchowski19@gmail.com>2022-06-05 20:30:18 +0200
commitd137ceccefe08250106dcede1f30c270b0f9cf19 (patch)
tree882331d75edfaa89c0dbfdf3fda3130ecc91f339
parent1dd7253133c4dfd2e7a16ad6fe505442cef38a5b (diff)
Fix incorrect comment in `hiliteMatches`
-rw-r--r--src/libutil/hilite.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/hilite.cc b/src/libutil/hilite.cc
index a5991ca39..e5088230d 100644
--- a/src/libutil/hilite.cc
+++ b/src/libutil/hilite.cc
@@ -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();