Cleanup: argument naming, redundant NULL checks

This commit is contained in:
2019-10-03 07:31:24 +10:00
parent fcdd851858
commit c07eaa3384
17 changed files with 38 additions and 52 deletions

View File

@@ -72,8 +72,8 @@ struct BMFace *BKE_bmbvh_ray_cast_filter(BMBVHTree *tree,
float *r_dist,
float r_hitout[3],
float r_cagehit[3],
BMBVHTree_FaceFilter filter,
void *filter_cb);
BMBVHTree_FaceFilter filter_cb,
void *filter_userdata);
/* find a vert closest to co in a sphere of radius dist_max */
struct BMVert *BKE_bmbvh_find_vert_closest(BMBVHTree *tree,

View File

@@ -309,11 +309,11 @@ void BKE_image_get_aspect(struct Image *image, float *aspx, float *aspy);
/* image_gen.c */
void BKE_image_buf_fill_color(
unsigned char *rect, float *rect_float, int width, int height, const float color[4]);
void BKE_image_buf_fill_checker(unsigned char *rect, float *rect_float, int height, int width);
void BKE_image_buf_fill_checker(unsigned char *rect, float *rect_float, int width, int height);
void BKE_image_buf_fill_checker_color(unsigned char *rect,
float *rect_float,
int height,
int width);
int width,
int height);
/* Cycles hookup */
unsigned char *BKE_image_get_pixels_for_frame(struct Image *image, int frame);

View File

@@ -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;
}

View File

@@ -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:

View File

@@ -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);

View File

@@ -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);