diff --git a/rapidfuzz/distance/JaroWinkler.hpp b/rapidfuzz/distance/JaroWinkler.hpp index d6dd0753..d2306df3 100644 --- a/rapidfuzz/distance/JaroWinkler.hpp +++ b/rapidfuzz/distance/JaroWinkler.hpp @@ -200,11 +200,11 @@ struct CachedJaroWinkler : public detail::CachedSimilarityBase -explicit CachedJaroWinkler(const Sentence1& s1_, double _prefix_weight = 0.1) - -> CachedJaroWinkler>; +explicit CachedJaroWinkler(const Sentence1& s1_, + double _prefix_weight = 0.1) -> CachedJaroWinkler>; template -CachedJaroWinkler(InputIt1 first1, InputIt1 last1, double _prefix_weight = 0.1) - -> CachedJaroWinkler>; +CachedJaroWinkler(InputIt1 first1, InputIt1 last1, + double _prefix_weight = 0.1) -> CachedJaroWinkler>; } // namespace rapidfuzz diff --git a/rapidfuzz/distance/Jaro_impl.hpp b/rapidfuzz/distance/Jaro_impl.hpp index aeb289f1..1c4d946a 100644 --- a/rapidfuzz/distance/Jaro_impl.hpp +++ b/rapidfuzz/distance/Jaro_impl.hpp @@ -296,7 +296,8 @@ static inline size_t count_transpositions_block(const BlockPatternMatchVector& P uint64_t PatternFlagMask = blsi(P_flag); - Transpositions += !(PM.get(PatternWord, T_first[static_cast(countr_zero(T_flag))]) & PatternFlagMask); + Transpositions += !(PM.get(PatternWord, T_first[static_cast(countr_zero(T_flag))]) & + PatternFlagMask); T_flag = blsr(T_flag); P_flag ^= PatternFlagMask; @@ -649,7 +650,9 @@ jaro_similarity_simd_long_s2(Range scores, const detail::BlockPatternMa for (size_t i = 0; i < vec_width; ++i) { size_t CommonChars = static_cast(counts[i]); - if (!jaro_common_char_filter(static_cast(s1_lengths[result_index]), s2.size(), CommonChars, score_cutoff)) { + if (!jaro_common_char_filter(static_cast(s1_lengths[result_index]), s2.size(), + CommonChars, score_cutoff)) + { scores[result_index] = 0.0; result_index++; continue; @@ -683,8 +686,8 @@ jaro_similarity_simd_long_s2(Range scores, const detail::BlockPatternMa } } - double Sim = - jaro_calculate_similarity(static_cast(s1_lengths[result_index]), s2.size(), CommonChars, Transpositions); + double Sim = jaro_calculate_similarity(static_cast(s1_lengths[result_index]), s2.size(), + CommonChars, Transpositions); scores[result_index] = (Sim >= score_cutoff) ? Sim : 0; result_index++; @@ -760,7 +763,9 @@ jaro_similarity_simd_short_s2(Range scores, const detail::BlockPatternM T_flag.store(T_flags.data()); for (size_t i = 0; i < vec_width; ++i) { size_t CommonChars = static_cast(counts[i]); - if (!jaro_common_char_filter(static_cast(s1_lengths[result_index]), s2.size(), CommonChars, score_cutoff)) { + if (!jaro_common_char_filter(static_cast(s1_lengths[result_index]), s2.size(), + CommonChars, score_cutoff)) + { scores[result_index] = 0.0; result_index++; continue; @@ -783,8 +788,8 @@ jaro_similarity_simd_short_s2(Range scores, const detail::BlockPatternM P_flag_cur ^= PatternFlagMask; } - double Sim = - jaro_calculate_similarity(static_cast(s1_lengths[result_index]), s2.size(), CommonChars, Transpositions); + double Sim = jaro_calculate_similarity(static_cast(s1_lengths[result_index]), s2.size(), + CommonChars, Transpositions); scores[result_index] = (Sim >= score_cutoff) ? Sim : 0; result_index++; diff --git a/rapidfuzz/distance/LCSseq_impl.hpp b/rapidfuzz/distance/LCSseq_impl.hpp index cbcf4e73..20d10b1a 100644 --- a/rapidfuzz/distance/LCSseq_impl.hpp +++ b/rapidfuzz/distance/LCSseq_impl.hpp @@ -188,8 +188,8 @@ void lcs_simd(Range scores, const BlockPatternMatchVector& block, const #endif template -auto lcs_unroll(const PMV& block, const Range&, const Range& s2, size_t score_cutoff = 0) - -> LCSseqResult +auto lcs_unroll(const PMV& block, const Range&, const Range& s2, + size_t score_cutoff = 0) -> LCSseqResult { uint64_t S[N]; unroll([&](size_t i) { S[i] = ~UINT64_C(0); }); diff --git a/rapidfuzz/distance/Levenshtein.hpp b/rapidfuzz/distance/Levenshtein.hpp index c2b21bde..3d61a212 100644 --- a/rapidfuzz/distance/Levenshtein.hpp +++ b/rapidfuzz/distance/Levenshtein.hpp @@ -482,11 +482,11 @@ struct CachedLevenshtein : public detail::CachedDistanceBase -explicit CachedLevenshtein(const Sentence1& s1_, LevenshteinWeightTable aWeights = {1, 1, 1}) - -> CachedLevenshtein>; +explicit CachedLevenshtein(const Sentence1& s1_, LevenshteinWeightTable aWeights = { + 1, 1, 1}) -> CachedLevenshtein>; template -CachedLevenshtein(InputIt1 first1, InputIt1 last1, LevenshteinWeightTable aWeights = {1, 1, 1}) - -> CachedLevenshtein>; +CachedLevenshtein(InputIt1 first1, InputIt1 last1, + LevenshteinWeightTable aWeights = {1, 1, 1}) -> CachedLevenshtein>; } // namespace rapidfuzz