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 13:30:43 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-08-07 14:38:06 +0300
commit1b272a649b40e99dba4185167f6cee7cbece1942 (patch)
tree2785f52c566b36cbdcbf9355f698dc520ffbb482 /source/blender/blenkernel/intern/customdata.c
parentcfc6f9eb18e701f5be601b95c45004e8cf7fbc81 (diff)
Cleanup: Blenkernel, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/blenkernel` module. No functional changes.
Diffstat (limited to 'source/blender/blenkernel/intern/customdata.c')
-rw-r--r--source/blender/blenkernel/intern/customdata.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 7ddb0a6862d..0c1717ea184 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -771,7 +771,7 @@ static void layerCopyValue_mloopcol(const void *source,
if (mixmode == CDT_MIX_REPLACE_ABOVE_THRESHOLD && f < mixfactor) {
return; /* Do Nothing! */
}
- else if (mixmode == CDT_MIX_REPLACE_BELOW_THRESHOLD && f > mixfactor) {
+ if (mixmode == CDT_MIX_REPLACE_BELOW_THRESHOLD && f > mixfactor) {
return; /* Do Nothing! */
}
}
@@ -1358,7 +1358,7 @@ static void layerCopyValue_propcol(const void *source,
if (mixmode == CDT_MIX_REPLACE_ABOVE_THRESHOLD && f < mixfactor) {
return; /* Do Nothing! */
}
- else if (mixmode == CDT_MIX_REPLACE_BELOW_THRESHOLD && f > mixfactor) {
+ if (mixmode == CDT_MIX_REPLACE_BELOW_THRESHOLD && f > mixfactor) {
return; /* Do Nothing! */
}
}
@@ -2201,13 +2201,13 @@ bool CustomData_merge(const struct CustomData *source,
if (flag & CD_FLAG_NOCOPY) {
continue;
}
- else if (!(mask & CD_TYPE_AS_MASK(type))) {
+ if (!(mask & CD_TYPE_AS_MASK(type))) {
continue;
}
- else if ((maxnumber != -1) && (number >= maxnumber)) {
+ if ((maxnumber != -1) && (number >= maxnumber)) {
continue;
}
- else if (CustomData_get_named_layer_index(dest, type, layer->name) != -1) {
+ if (CustomData_get_named_layer_index(dest, type, layer->name) != -1) {
continue;
}
@@ -4052,9 +4052,8 @@ bool CustomData_data_equals(int type, const void *data1, const void *data2)
if (typeInfo->equal) {
return typeInfo->equal(data1, data2);
}
- else {
- return !memcmp(data1, data2, typeInfo->size);
- }
+
+ return !memcmp(data1, data2, typeInfo->size);
}
void CustomData_data_initminmax(int type, void *min, void *max)
@@ -4411,7 +4410,7 @@ int CustomData_layertype_layers_max(const int type)
if (typeInfo->defaultname == NULL) {
return 1;
}
- else if (typeInfo->layers_max == NULL) {
+ if (typeInfo->layers_max == NULL) {
return -1;
}