Cleanup: compiler warnings

This commit is contained in:
Brecht Van Lommel 2022-06-17 18:29:12 +02:00
parent 0ea173165b
commit 5485057a27
3 changed files with 8 additions and 6 deletions

View File

@ -18,7 +18,7 @@ struct Mesh;
struct BVHTreeFromMesh;
namespace blender {
struct RandomNumberGenerator;
class RandomNumberGenerator;
}
namespace blender::bke {

View File

@ -4818,8 +4818,7 @@ static int ui_do_but_GRIDTILE(bContext *C,
uiHandleButtonData *data,
const wmEvent *event)
{
uiButGridTile *grid_tile_but = (uiButGridTile *)but;
BLI_assert(grid_tile_but->but.type == UI_BTYPE_GRID_TILE);
BLI_assert(but->type == UI_BTYPE_GRID_TILE);
if (data->state == BUTTON_STATE_HIGHLIGHT) {
if (event->type == LEFTMOUSE) {
@ -4840,7 +4839,8 @@ static int ui_do_but_GRIDTILE(bContext *C,
case KM_DBL_CLICK:
data->cancel = true;
// UI_tree_view_item_begin_rename(grid_tile_but->tree_item);
// uiButGridTile *grid_tile_but = (uiButGridTile *)but;
// UI_tree_view_item_begin_rename(grid_tile_but->tree_item);
ED_region_tag_redraw(CTX_wm_region(C));
return WM_UI_HANDLER_BREAK;
}

View File

@ -698,16 +698,18 @@ bool rna_PoseChannel_constraints_override_apply(Main *bmain,
return true;
}
static int rna_PoseChannel_proxy_editable(PointerRNA *ptr, const char **r_info)
static int rna_PoseChannel_proxy_editable(PointerRNA *UNUSED(ptr), const char **UNUSED(r_info))
{
# if 0
Object *ob = (Object *)ptr->owner_id;
bArmature *arm = ob->data;
bPoseChannel *pchan = (bPoseChannel *)ptr->data;
if (false && pchan->bone && (pchan->bone->layer & arm->layer_protected)) {
if (pchan->bone && (pchan->bone->layer & arm->layer_protected)) {
*r_info = "Can't edit property of a proxy on a protected layer";
return 0;
}
# endif
return PROP_EDITABLE;
}