diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2022-10-21 14:47:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-21 20:47:44 +0800 |
commit | 784e498c4a9c1f03266ced5ec3f55c3a6c94b80d (patch) | |
tree | 55f79bf7e309d522a76f6efe0cb3ed631340f431 /src/nvim/indent.c | |
parent | e554f5c545b9ee1195d617b3ac21f24829330a31 (diff) | |
download | rneovim-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/indent.c')
-rw-r--r-- | src/nvim/indent.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/indent.c b/src/nvim/indent.c index 3f08aa7043..cb5819e946 100644 --- a/src/nvim/indent.c +++ b/src/nvim/indent.c @@ -101,7 +101,7 @@ bool tabstop_set(char *var, long **array) /// Calculate the number of screen spaces a tab will occupy. /// If "vts" is set then the tab widths are taken from that array, /// otherwise the value of ts is used. -int tabstop_padding(colnr_T col, long ts_arg, long *vts) +int tabstop_padding(colnr_T col, long ts_arg, const long *vts) { long ts = ts_arg == 0 ? 8 : ts_arg; colnr_T tabcol = 0; @@ -129,7 +129,7 @@ int tabstop_padding(colnr_T col, long ts_arg, long *vts) } /// Find the size of the tab that covers a particular column. -int tabstop_at(colnr_T col, long ts, long *vts) +int tabstop_at(colnr_T col, long ts, const long *vts) { colnr_T tabcol = 0; int t; @@ -178,7 +178,7 @@ colnr_T tabstop_start(colnr_T col, long ts, long *vts) /// Find the number of tabs and spaces necessary to get from one column /// to another. -void tabstop_fromto(colnr_T start_col, colnr_T end_col, long ts_arg, long *vts, int *ntabs, +void tabstop_fromto(colnr_T start_col, colnr_T end_col, long ts_arg, const long *vts, int *ntabs, int *nspcs) { int spaces = end_col - start_col; @@ -242,7 +242,7 @@ void tabstop_fromto(colnr_T start_col, colnr_T end_col, long ts_arg, long *vts, } /// See if two tabstop arrays contain the same values. -bool tabstop_eq(long *ts1, long *ts2) +bool tabstop_eq(const long *ts1, const long *ts2) { int t; @@ -266,7 +266,7 @@ bool tabstop_eq(long *ts1, long *ts2) } /// Copy a tabstop array, allocating space for the new array. -int *tabstop_copy(long *oldts) +int *tabstop_copy(const long *oldts) { long *newts; int t; |