From 5ddd1555bc38b4e2b92d968ef688c21be9734a54 Mon Sep 17 00:00:00 2001 From: Karol Kosek Date: Thu, 14 Oct 2021 15:35:38 +0200 Subject: Assistant: Make strings const referenced Found by clazy. --- Userland/Applications/Assistant/FuzzyMatch.cpp | 2 +- Userland/Applications/Assistant/FuzzyMatch.h | 2 +- 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); } -- cgit v1.2.3