aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/spellsuggest.c
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2022-10-21 14:47:44 +0200
committerGitHub <noreply@github.com>2022-10-21 20:47:44 +0800
commit784e498c4a9c1f03266ced5ec3f55c3a6c94b80d (patch)
tree55f79bf7e309d522a76f6efe0cb3ed631340f431 /src/nvim/spellsuggest.c
parente554f5c545b9ee1195d617b3ac21f24829330a31 (diff)
downloadrneovim-784e498c4a9c1f03266ced5ec3f55c3a6c94b80d.tar.gz
rneovim-784e498c4a9c1f03266ced5ec3f55c3a6c94b80d.tar.bz2
rneovim-784e498c4a9c1f03266ced5ec3f55c3a6c94b80d.zip
refactor: clang-tidy fixes to silence clangd warning (#20683)
* refactor: readability-uppercase-literal-suffix * refactor: readability-named-parameter * refactor: bugprone-suspicious-string-compare * refactor: google-readability-casting * refactor: readability-redundant-control-flow * refactor: bugprone-too-small-loop-variable * refactor: readability-non-const-parameter * refactor: readability-avoid-const-params-in-decls * refactor: google-readability-todo * refactor: readability-inconsistent-declaration-parameter-name * refactor: bugprone-suspicious-missing-comma * refactor: remove noisy or slow warnings
Diffstat (limited to 'src/nvim/spellsuggest.c')
-rw-r--r--src/nvim/spellsuggest.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/spellsuggest.c b/src/nvim/spellsuggest.c
index 2ff41d5157..fbe2ec837b 100644
--- a/src/nvim/spellsuggest.c
+++ b/src/nvim/spellsuggest.c
@@ -3530,7 +3530,7 @@ static int soundalike_score(char *goodstart, char *badstart)
/// The implementation of the algorithm comes from Aspell editdist.cpp,
/// edit_distance(). It has been converted from C++ to C and modified to
/// support multi-byte characters.
-static int spell_edit_score(slang_T *slang, char_u *badword, char_u *goodword)
+static int spell_edit_score(slang_T *slang, const char_u *badword, const char_u *goodword)
{
int *cnt;
int j, i;
@@ -3635,7 +3635,8 @@ static int spell_edit_score_limit(slang_T *slang, char_u *badword, char_u *goodw
/// Multi-byte version of spell_edit_score_limit().
/// Keep it in sync with the above!
-static int spell_edit_score_limit_w(slang_T *slang, char_u *badword, char_u *goodword, int limit)
+static int spell_edit_score_limit_w(slang_T *slang, const char_u *badword, const char_u *goodword,
+ int limit)
{
limitscore_T stack[10]; // allow for over 3 * 2 edits
int stackidx;