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 16:42:22 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-07-03 17:15:01 +0300
commitde7c9f41e613a704f8e3258050b952d2ada60083 (patch)
tree2fa974caba4f9450e22f8d4da9400387b536dd16 /source/blender/editors/object/object_bake_api.c
parent19483125f8da79cb270cb8d6df76b2e67100c089 (diff)
Cleanup: Editors/Object, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/editors/object` module. No functional changes.
Diffstat (limited to 'source/blender/editors/object/object_bake_api.c')
-rw-r--r--source/blender/editors/object/object_bake_api.c30
1 files changed, 11 insertions, 19 deletions
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c
index e84dbca2469..c4cb21a67f3 100644
--- a/source/blender/editors/object/object_bake_api.c
+++ b/source/blender/editors/object/object_bake_api.c
@@ -434,14 +434,12 @@ static bool bake_object_check(ViewLayer *view_layer, Object *ob, ReportList *rep
BKE_reportf(reports, RPT_ERROR, "Object \"%s\" is not a mesh", ob->id.name + 2);
return false;
}
- else {
- Mesh *me = (Mesh *)ob->data;
- if (CustomData_get_active_layer_index(&me->ldata, CD_MLOOPUV) == -1) {
- BKE_reportf(
- reports, RPT_ERROR, "No active UV layer found in the object \"%s\"", ob->id.name + 2);
- return false;
- }
+ Mesh *me = (Mesh *)ob->data;
+ if (CustomData_get_active_layer_index(&me->ldata, CD_MLOOPUV) == -1) {
+ BKE_reportf(
+ reports, RPT_ERROR, "No active UV layer found in the object \"%s\"", ob->id.name + 2);
+ return false;
}
for (i = 0; i < ob->totcol; i++) {
@@ -542,14 +540,11 @@ static bool bake_pass_filter_check(eScenePassType pass_type,
return false;
}
- else {
- BKE_report(reports,
- RPT_ERROR,
- "Combined bake pass requires Emit, or a light pass with "
- "Direct or Indirect contributions enabled");
- return false;
- }
- break;
+ BKE_report(reports,
+ RPT_ERROR,
+ "Combined bake pass requires Emit, or a light pass with "
+ "Direct or Indirect contributions enabled");
+ return false;
case SCE_PASS_DIFFUSE_COLOR:
case SCE_PASS_GLOSSY_COLOR:
case SCE_PASS_TRANSM_COLOR:
@@ -1071,10 +1066,7 @@ static int bake(Render *re,
(normal_swizzle[2] == R_BAKE_POSZ)) {
break;
}
- else {
- RE_bake_normal_world_to_world(
- pixel_array_low, num_pixels, depth, result, normal_swizzle);
- }
+ RE_bake_normal_world_to_world(pixel_array_low, num_pixels, depth, result, normal_swizzle);
break;
}
case R_BAKE_SPACE_OBJECT: {