Cleanup: clang tidy

This commit is contained in:
Jacques Lucke 2021-07-26 11:43:51 +02:00
parent 6abf63f463
commit 12afb19959
5 changed files with 13 additions and 16 deletions

View File

@ -340,10 +340,8 @@ static int *mesh_render_data_mat_tri_len_build(MeshRenderData *mr)
return mesh_render_data_mat_tri_len_build_threaded(
mr, bm->totface, mesh_render_data_mat_tri_len_bm_range_fn);
}
else {
return mesh_render_data_mat_tri_len_build_threaded(
mr, mr->poly_len, mesh_render_data_mat_tri_len_mesh_range_fn);
}
return mesh_render_data_mat_tri_len_build_threaded(
mr, mr->poly_len, mesh_render_data_mat_tri_len_mesh_range_fn);
}
/** \} */

View File

@ -38,14 +38,14 @@
using namespace blender::bke;
/* simple struct for storing backup info for one pose channel */
typedef struct PoseChannelBackup {
struct PoseChannelBackup {
struct PoseChannelBackup *next, *prev;
struct bPoseChannel *pchan; /* Pose channel this backup is for. */
struct bPoseChannel olddata; /* Backup of pose channel. */
struct IDProperty *oldprops; /* Backup copy (needs freeing) of pose channel's ID properties. */
} PoseChannelBackup;
};
struct PoseBackup {
bool is_bone_selection_relevant;
@ -61,7 +61,7 @@ static PoseBackup *pose_backup_create(const Object *ob,
BoneNameSet backed_up_bone_names;
/* Make a backup of the given pose channel. */
auto store_animated_pchans = [&](FCurve *, const char *bone_name) {
auto store_animated_pchans = [&](FCurve * /* unused */, const char *bone_name) {
if (backed_up_bone_names.contains(bone_name)) {
/* Only backup each bone once. */
return;

View File

@ -109,15 +109,15 @@ const EnumPropertyItem *ED_asset_library_reference_to_rna_enum_itemf()
ICON_BLENDER,
"Current File",
"Show the assets currently available in this Blender session"},
{0, NULL, 0, NULL, NULL},
{0, nullptr, 0, nullptr, nullptr},
};
EnumPropertyItem *item = NULL;
EnumPropertyItem *item = nullptr;
int totitem = 0;
/* Add separator if needed. */
if (!BLI_listbase_is_empty(&U.asset_libraries)) {
const EnumPropertyItem sepr = {0, "", 0, "Custom", NULL};
const EnumPropertyItem sepr = {0, "", 0, "Custom", nullptr};
RNA_enum_item_add(&item, &totitem, &sepr);
}
@ -144,7 +144,7 @@ const EnumPropertyItem *ED_asset_library_reference_to_rna_enum_itemf()
}
if (totitem) {
const EnumPropertyItem sepr = {0, "", 0, "Built-in", NULL};
const EnumPropertyItem sepr = {0, "", 0, "Built-in", nullptr};
RNA_enum_item_add(&item, &totitem, &sepr);
}

View File

@ -59,9 +59,10 @@ static void asset_view_item_but_drag_set(uiBut *but,
}
char blend_path[FILE_MAX_LIBEXTRA];
/* Context can be NULL here, it's only needed for a File Browser specific hack that should go
/* Context can be null here, it's only needed for a File Browser specific hack that should go
* away before too long. */
ED_asset_handle_get_full_library_path(NULL, &list_data->asset_library, asset_handle, blend_path);
ED_asset_handle_get_full_library_path(
nullptr, &list_data->asset_library, asset_handle, blend_path);
if (blend_path[0]) {
ImBuf *imbuf = ED_assetlist_asset_image_get(asset_handle);

View File

@ -435,9 +435,7 @@ static bool anything_showing_through(PointerRNA *ptr)
if (use_multiple_levels) {
return (MAX2(level_start, level_end) > 0);
}
else {
return (level_start > 0);
}
return (level_start > 0);
}
static void material_mask_panel_draw_header(const bContext *UNUSED(C), Panel *panel)