mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
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
This commit is contained in:
@@ -819,7 +819,7 @@ endOK:
|
||||
|
||||
// Fill in the wordcount fields for a trie.
|
||||
// Returns the total number of words.
|
||||
static void tree_count_words(char_u *byts, idx_T *idxs)
|
||||
static void tree_count_words(const char_u *byts, idx_T *idxs)
|
||||
{
|
||||
int depth;
|
||||
idx_T arridx[MAXWLEN];
|
||||
@@ -2171,18 +2171,14 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
|
||||
midword = (char_u *)getroom_save(spin, (char_u *)items[1]);
|
||||
} else if (is_aff_rule(items, itemcnt, "TRY", 2)) {
|
||||
// ignored, we look in the tree for what chars may appear
|
||||
}
|
||||
// TODO: remove "RAR" later
|
||||
else if ((is_aff_rule(items, itemcnt, "RAR", 2)
|
||||
|| is_aff_rule(items, itemcnt, "RARE", 2))
|
||||
&& aff->af_rare == 0) {
|
||||
} else if ((is_aff_rule(items, itemcnt, "RAR", 2) // TODO(vim): remove "RAR" later
|
||||
|| is_aff_rule(items, itemcnt, "RARE", 2))
|
||||
&& aff->af_rare == 0) {
|
||||
aff->af_rare = affitem2flag(aff->af_flagtype, (char_u *)items[1],
|
||||
fname, lnum);
|
||||
}
|
||||
// TODO: remove "KEP" later
|
||||
else if ((is_aff_rule(items, itemcnt, "KEP", 2)
|
||||
|| is_aff_rule(items, itemcnt, "KEEPCASE", 2))
|
||||
&& aff->af_keepcase == 0) {
|
||||
} else if ((is_aff_rule(items, itemcnt, "KEP", 2) // TODO(vim): remove "KEP" later
|
||||
|| is_aff_rule(items, itemcnt, "KEEPCASE", 2))
|
||||
&& aff->af_keepcase == 0) {
|
||||
aff->af_keepcase = affitem2flag(aff->af_flagtype, (char_u *)items[1],
|
||||
fname, lnum);
|
||||
} else if ((is_aff_rule(items, itemcnt, "BAD", 2)
|
||||
@@ -3962,8 +3958,8 @@ static int store_word(spellinfo_T *spin, char_u *word, int flags, int region, co
|
||||
// When "flags" < 0 we are adding to the prefix tree where "flags" is used for
|
||||
// "rare" and "region" is the condition nr.
|
||||
// Returns FAIL when out of memory.
|
||||
static int tree_add_word(spellinfo_T *spin, char_u *word, wordnode_T *root, int flags, int region,
|
||||
int affixID)
|
||||
static int tree_add_word(spellinfo_T *spin, const char_u *word, wordnode_T *root, int flags,
|
||||
int region, int affixID)
|
||||
{
|
||||
wordnode_T *node = root;
|
||||
wordnode_T *np;
|
||||
@@ -5742,7 +5738,7 @@ static void init_spellfile(void)
|
||||
/// Set the spell character tables from strings in the .spl file.
|
||||
///
|
||||
/// @param cnt length of "flags"
|
||||
static void set_spell_charflags(char_u *flags, int cnt, char_u *fol)
|
||||
static void set_spell_charflags(const char_u *flags, int cnt, char_u *fol)
|
||||
{
|
||||
// We build the new tables here first, so that we can compare with the
|
||||
// previous one.
|
||||
|
Reference in New Issue
Block a user