diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-08-07 13:31:44 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-08-07 14:38:06 +0300 |
commit | fb18e48a84a645a1ef8329f150b223afe0efc7f0 (patch) | |
tree | 82c855d14b620c34e72ebb9eda0621b4fbf21800 /source/blender/blenloader/intern/readblenentry.c | |
parent | 1b272a649b40e99dba4185167f6cee7cbece1942 (diff) |
Cleanup: Blenloader, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/blenloader` module.
No functional changes.
Diffstat (limited to 'source/blender/blenloader/intern/readblenentry.c')
-rw-r--r-- | source/blender/blenloader/intern/readblenentry.c | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c index cb2094d050f..888863dda06 100644 --- a/source/blender/blenloader/intern/readblenentry.c +++ b/source/blender/blenloader/intern/readblenentry.c @@ -102,28 +102,27 @@ void BLO_blendhandle_print_sizes(BlendHandle *bh, void *fp) if (bhead->code == ENDB) { break; } - else { - const short *sp = fd->filesdna->structs[bhead->SDNAnr]; - const char *name = fd->filesdna->types[sp[0]]; - char buf[4]; - - buf[0] = (bhead->code >> 24) & 0xFF; - buf[1] = (bhead->code >> 16) & 0xFF; - buf[2] = (bhead->code >> 8) & 0xFF; - buf[3] = (bhead->code >> 0) & 0xFF; - - buf[0] = buf[0] ? buf[0] : ' '; - buf[1] = buf[1] ? buf[1] : ' '; - buf[2] = buf[2] ? buf[2] : ' '; - buf[3] = buf[3] ? buf[3] : ' '; - - fprintf(fp, - "['%.4s', '%s', %d, %ld ],\n", - buf, - name, - bhead->nr, - (long int)(bhead->len + sizeof(BHead))); - } + + const short *sp = fd->filesdna->structs[bhead->SDNAnr]; + const char *name = fd->filesdna->types[sp[0]]; + char buf[4]; + + buf[0] = (bhead->code >> 24) & 0xFF; + buf[1] = (bhead->code >> 16) & 0xFF; + buf[2] = (bhead->code >> 8) & 0xFF; + buf[3] = (bhead->code >> 0) & 0xFF; + + buf[0] = buf[0] ? buf[0] : ' '; + buf[1] = buf[1] ? buf[1] : ' '; + buf[2] = buf[2] ? buf[2] : ' '; + buf[3] = buf[3] ? buf[3] : ' '; + + fprintf(fp, + "['%.4s', '%s', %d, %ld ],\n", + buf, + name, + bhead->nr, + (long int)(bhead->len + sizeof(BHead))); } fprintf(fp, "]\n"); } @@ -268,7 +267,7 @@ LinkNode *BLO_blendhandle_get_linkable_groups(BlendHandle *bh) if (bhead->code == ENDB) { break; } - else if (BKE_idtype_idcode_is_valid(bhead->code)) { + if (BKE_idtype_idcode_is_valid(bhead->code)) { if (BKE_idtype_idcode_is_linkable(bhead->code)) { const char *str = BKE_idtype_idcode_to_name(bhead->code); |