vim-patch:9.0.1246: code is indented more than necessary (#22006)

Problem:    Code is indented more than necessary.
Solution:   Use an early return where it makes sense. (Yegappan Lakshmanan,
            closes vim/vim#11887)

142ed77898

Omit function_using_block_scopes(): only affects Vim9 script.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
zeertzjq
2023-01-26 21:05:34 +08:00
committed by GitHub
parent e02df23b4e
commit 41aa5ce3eb
3 changed files with 26 additions and 21 deletions

View File

@@ -760,13 +760,12 @@ static void funccal_unref(funccall_T *fc, ufunc_T *fp, bool force)
static bool func_remove(ufunc_T *fp)
{
hashitem_T *hi = hash_find(&func_hashtab, (char *)UF2HIKEY(fp));
if (!HASHITEM_EMPTY(hi)) {
hash_remove(&func_hashtab, hi);
return true;
if (HASHITEM_EMPTY(hi)) {
return false;
}
return false;
hash_remove(&func_hashtab, hi);
return true;
}
static void func_clear_items(ufunc_T *fp)