diff options
author | dundargoc <gocdundar@gmail.com> | 2022-10-22 12:36:38 +0200 |
---|---|---|
committer | dundargoc <gocdundar@gmail.com> | 2022-11-06 11:44:10 +0100 |
commit | 731cdde28ea8d48cc23ba2752a08c261c87eee92 (patch) | |
tree | 92e814050fdbca64aca435f03975b6d5678fbdf3 /src/nvim/lua/stdlib.c | |
parent | a79d28e4d7939c13f38cf4ce63ff240011bca96d (diff) | |
download | rneovim-731cdde28ea8d48cc23ba2752a08c261c87eee92.tar.gz rneovim-731cdde28ea8d48cc23ba2752a08c261c87eee92.tar.bz2 rneovim-731cdde28ea8d48cc23ba2752a08c261c87eee92.zip |
refactor: fix clang-tidy warnings
Enable and fix bugprone-misplaced-widening-cast warning.
Fix some modernize-macro-to-enum and readability-else-after-return
warnings, but don't enable them. While the warnings can be useful, they
are in general too noisy to enable.
Diffstat (limited to 'src/nvim/lua/stdlib.c')
-rw-r--r-- | src/nvim/lua/stdlib.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/nvim/lua/stdlib.c b/src/nvim/lua/stdlib.c index 6974c6181c..54e2c24523 100644 --- a/src/nvim/lua/stdlib.c +++ b/src/nvim/lua/stdlib.c @@ -378,15 +378,14 @@ int nlua_setvar(lua_State *lstate) if (di == NULL) { // Doesn't exist, nothing to do return 0; - } else { - // Notify watchers - if (watched) { - tv_dict_watcher_notify(dict, key.data, NULL, &di->di_tv); - } - - // Delete the entry - tv_dict_item_remove(dict, di); } + // Notify watchers + if (watched) { + tv_dict_watcher_notify(dict, key.data, NULL, &di->di_tv); + } + + // Delete the entry + tv_dict_item_remove(dict, di); } else { // Update the key typval_T tv; |