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/colorband.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/colorband.c')
-rw-r--r--source/blender/blenkernel/intern/colorband.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/colorband.c b/source/blender/blenkernel/intern/colorband.c
index 499b0305c9d..323a2f0cf53 100644
--- a/source/blender/blenkernel/intern/colorband.c
+++ b/source/blender/blenkernel/intern/colorband.c
@@ -587,7 +587,7 @@ static int vergcband(const void *a1, const void *a2)
if (x1->pos > x2->pos) {
return 1;
}
- else if (x1->pos < x2->pos) {
+ if (x1->pos < x2->pos) {
return -1;
}
return 0;
@@ -620,18 +620,17 @@ CBData *BKE_colorband_element_add(struct ColorBand *coba, float position)
if (coba->tot == MAXCOLORBAND) {
return NULL;
}
- else {
- CBData *xnew;
- xnew = &coba->data[coba->tot];
- xnew->pos = position;
+ CBData *xnew;
- if (coba->tot != 0) {
- BKE_colorband_evaluate(coba, position, &xnew->r);
- }
- else {
- zero_v4(&xnew->r);
- }
+ xnew = &coba->data[coba->tot];
+ xnew->pos = position;
+
+ if (coba->tot != 0) {
+ BKE_colorband_evaluate(coba, position, &xnew->r);
+ }
+ else {
+ zero_v4(&xnew->r);
}
coba->tot++;