diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-10-03 00:31:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-10-03 00:32:28 +0300 |
commit | c07eaa3384dfe90bc2671a9bb3be2b77ad33297d (patch) | |
tree | 0fdb4d7c21b10fa24a95be35aeab9dc58063403b /source/blender/blenkernel/intern | |
parent | fcdd851858a61dbc7ec8cf79c0b9d022bb68f896 (diff) |
Cleanup: argument naming, redundant NULL checks
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/cloth.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/paint.c | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/subdiv_ccg.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/text.c | 2 |
4 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 63d58f7e32e..463cbd4f378 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -772,7 +772,7 @@ static int cloth_from_object( clmd->clothObject->old_solver_type = 255; clmd->clothObject->edgeset = NULL; } - else if (!clmd->clothObject) { + else { modifier_setError(&(clmd->modifier), "Out of memory on allocating clmd->clothObject"); return 0; } diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index 983127372ca..143b8debce7 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -224,7 +224,6 @@ const EnumPropertyItem *BKE_paint_get_tool_enum_from_paintmode(ePaintMode mode) return rna_enum_brush_image_tool_items; case PAINT_MODE_SCULPT_UV: return rna_enum_brush_uv_sculpt_tool_items; - return NULL; case PAINT_MODE_GPENCIL: return rna_enum_brush_gpencil_types_items; case PAINT_MODE_INVALID: diff --git a/source/blender/blenkernel/intern/subdiv_ccg.c b/source/blender/blenkernel/intern/subdiv_ccg.c index 471cca53900..9ae0841bc82 100644 --- a/source/blender/blenkernel/intern/subdiv_ccg.c +++ b/source/blender/blenkernel/intern/subdiv_ccg.c @@ -593,7 +593,7 @@ Mesh *BKE_subdiv_to_ccg_mesh(Subdiv *subdiv, BKE_subdiv_stats_begin(&subdiv->stats, SUBDIV_STATS_SUBDIV_TO_CCG); if (!BKE_subdiv_eval_update_from_mesh(subdiv, coarse_mesh, NULL)) { if (coarse_mesh->totpoly) { - return false; + return NULL; } } BKE_subdiv_stats_end(&subdiv->stats, SUBDIV_STATS_SUBDIV_TO_CCG); diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index 83be64e84c9..6b8e33e3a01 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -352,7 +352,7 @@ Text *BKE_text_load_ex(Main *bmain, const char *file, const char *relpath, const buffer = BLI_file_read_text_as_mem(filepath_abs, 0, &buffer_len); if (buffer == NULL) { - return false; + return NULL; } ta = BKE_libblock_alloc(bmain, ID_TXT, BLI_path_basename(filepath_abs), 0); |