Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2020-08-07 12:23:02 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-08-07 12:23:02 +0300
commita29686eeb3af051a00fbb8a8b9be06bcd050ec8c (patch)
tree9da60e7257e3e2dafda3e9b565b77c9c6f37675b /source/blender/blenlib/intern/array_store.c
parente0c51b466f3b23a1fc114690be2b008e19637ea6 (diff)
Cleanup: Blenlib, Clang-Tidy else-after-return fixes (incomplete)
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/blenlib` module. Not all warnings are addressed in this commit. No functional changes.
Diffstat (limited to 'source/blender/blenlib/intern/array_store.c')
-rw-r--r--source/blender/blenlib/intern/array_store.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/source/blender/blenlib/intern/array_store.c b/source/blender/blenlib/intern/array_store.c
index 85fbe7ece0f..387f9837159 100644
--- a/source/blender/blenlib/intern/array_store.c
+++ b/source/blender/blenlib/intern/array_store.c
@@ -355,9 +355,7 @@ static bool bchunk_data_compare(const BChunk *chunk,
if (offset + (size_t)chunk->data_len <= data_base_len) {
return (memcmp(&data_base[offset], chunk->data, chunk->data_len) == 0);
}
- else {
- return false;
- }
+ return false;
}
/** \} */
@@ -893,20 +891,18 @@ static hash_key key_from_chunk_ref(const BArrayInfo *info,
# endif
return key;
}
- else {
- /* corner case - we're too small, calculate the key each time. */
+ /* corner case - we're too small, calculate the key each time. */
- hash_array_from_cref(info, cref, info->accum_read_ahead_bytes, hash_store);
- hash_accum_single(hash_store, hash_store_len, info->accum_steps);
- hash_key key = hash_store[0];
+ hash_array_from_cref(info, cref, info->accum_read_ahead_bytes, hash_store);
+ hash_accum_single(hash_store, hash_store_len, info->accum_steps);
+ hash_key key = hash_store[0];
# ifdef USE_HASH_TABLE_KEY_CACHE
- if (UNLIKELY(key == HASH_TABLE_KEY_UNSET)) {
- key = HASH_TABLE_KEY_FALLBACK;
- }
-# endif
- return key;
+ if (UNLIKELY(key == HASH_TABLE_KEY_UNSET)) {
+ key = HASH_TABLE_KEY_FALLBACK;
}
+# endif
+ return key;
}
static const BChunkRef *table_lookup(const BArrayInfo *info,
@@ -1083,9 +1079,7 @@ static BChunkList *bchunk_list_from_data_merge(const BArrayInfo *info,
if (cref == cref_match_first) {
break;
}
- else {
- cref = cref->next;
- }
+ cref = cref->next;
}
/* happens when bytes are removed from the end of the array */
if (chunk_size_step == data_len_original) {