aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/hilite.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/hilite.cc')
-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();