mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 02:46:31 +00:00
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.
This commit is contained in:
@@ -1747,9 +1747,8 @@ static bool tv_dict_watcher_matches(DictWatcher *watcher, const char *const key)
|
||||
const size_t len = watcher->key_pattern_len;
|
||||
if (len && watcher->key_pattern[len - 1] == '*') {
|
||||
return strncmp(key, watcher->key_pattern, len - 1) == 0;
|
||||
} else {
|
||||
return strcmp(key, watcher->key_pattern) == 0;
|
||||
}
|
||||
return strcmp(key, watcher->key_pattern) == 0;
|
||||
}
|
||||
|
||||
/// Send a change notification to all dictionary watchers that match given key
|
||||
|
Reference in New Issue
Block a user