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-07-03 19:04:40 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-07-03 19:18:16 +0300
commitd2db481dc70bba7b5ca2c3bf01e8748155fcefad (patch)
treec587f36b76c075bd3ecb4be48104fe1ce82d5e15 /source/blender/blenkernel/intern/brush.c
parenta21cb22f8b12ea73937e7e6eda8465f1cba02b6e (diff)
Cleanup: Blendkernel, Clang-Tidy else-after-return fixes (incomplete)
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/blenkernel` module. Not all warnings are addressed in this commit. No functional changes.
Diffstat (limited to 'source/blender/blenkernel/intern/brush.c')
-rw-r--r--source/blender/blenkernel/intern/brush.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index a8f52593429..522bf42105c 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -372,8 +372,8 @@ bool BKE_brush_delete(Main *bmain, Brush *brush)
if (brush->id.tag & LIB_TAG_INDIRECT) {
return false;
}
- else if (BKE_library_ID_is_indirectly_used(bmain, brush) && ID_REAL_USERS(brush) <= 1 &&
- ID_EXTRA_USERS(brush) == 0) {
+ if (BKE_library_ID_is_indirectly_used(bmain, brush) && ID_REAL_USERS(brush) <= 1 &&
+ ID_EXTRA_USERS(brush) == 0) {
return false;
}
@@ -2180,10 +2180,9 @@ float BKE_brush_curve_strength(const Brush *br, float p, const float len)
if (p >= len) {
return 0;
}
- else {
- p = p / len;
- p = 1.0f - p;
- }
+
+ p = p / len;
+ p = 1.0f - p;
switch (br->curve_preset) {
case BRUSH_CURVE_CUSTOM: