summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarol Kosek <krkk@serenityos.org>2021-10-14 15:35:38 +0200
committerAndreas Kling <kling@serenityos.org>2021-10-25 13:00:32 +0200
commit5ddd1555bc38b4e2b92d968ef688c21be9734a54 (patch)
tree79aeee59331586d7bc39dc09c54edf7cbe6648ac
parent7496f1762018c7db2144a6474f008ee908a06333 (diff)
downloadserenity-5ddd1555bc38b4e2b92d968ef688c21be9734a54.zip
Assistant: Make strings const referenced
Found by clazy.
-rw-r--r--Userland/Applications/Assistant/FuzzyMatch.cpp2
-rw-r--r--Userland/Applications/Assistant/FuzzyMatch.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Applications/Assistant/FuzzyMatch.cpp b/Userland/Applications/Assistant/FuzzyMatch.cpp
index e021637a83..a7230ee6d0 100644
--- a/Userland/Applications/Assistant/FuzzyMatch.cpp
+++ b/Userland/Applications/Assistant/FuzzyMatch.cpp
@@ -113,7 +113,7 @@ static FuzzyMatchResult fuzzy_match_recursive(String const& needle, String const
return { false, out_score };
}
-FuzzyMatchResult fuzzy_match(String needle, String haystack)
+FuzzyMatchResult fuzzy_match(String const& needle, String const& haystack)
{
int recursion_count = 0;
u8 matches[MAX_MATCHES] {};
diff --git a/Userland/Applications/Assistant/FuzzyMatch.h b/Userland/Applications/Assistant/FuzzyMatch.h
index 9a471a322a..a35832c6db 100644
--- a/Userland/Applications/Assistant/FuzzyMatch.h
+++ b/Userland/Applications/Assistant/FuzzyMatch.h
@@ -24,6 +24,6 @@ struct FuzzyMatchResult {
// Scores are not normalized between any values and have no particular meaning. The starting value is 100 and when we
// detect good indicators of a match we add to the score. When we detect bad indicators, we penalize the match and subtract
// from its score. Therefore, the longer the needle/haystack the greater the range of scores could be.
-FuzzyMatchResult fuzzy_match(String needle, String haystack);
+FuzzyMatchResult fuzzy_match(String const& needle, String const& haystack);
}