Cleanup: clang-tidy warnings
Silenciate warnings of usage of 'else' after 'return'
This commit is contained in:
parent
bba6fe83e2
commit
b7c98c87ac
|
@ -144,7 +144,8 @@ static void *t_view_get(TransInfo *t)
|
|||
View3D *v3d = t->area->spacedata.first;
|
||||
return (void *)v3d;
|
||||
}
|
||||
else if (t->region) {
|
||||
|
||||
if (t->region) {
|
||||
return (void *)&t->region->v2d;
|
||||
}
|
||||
return NULL;
|
||||
|
@ -158,30 +159,35 @@ static int t_around_get(TransInfo *t)
|
|||
}
|
||||
|
||||
ScrArea *area = t->area;
|
||||
if (t->spacetype == SPACE_VIEW3D) {
|
||||
/* Bend always uses the cursor. */
|
||||
switch (t->spacetype) {
|
||||
case SPACE_VIEW3D: {
|
||||
if (t->mode == TFM_BEND) {
|
||||
/* Bend always uses the cursor. */
|
||||
return V3D_AROUND_CURSOR;
|
||||
}
|
||||
else {
|
||||
return t->settings->transform_pivot_point;
|
||||
}
|
||||
}
|
||||
else if (t->spacetype == SPACE_IMAGE) {
|
||||
case SPACE_IMAGE: {
|
||||
SpaceImage *sima = area->spacedata.first;
|
||||
return sima->around;
|
||||
}
|
||||
else if (t->spacetype == SPACE_GRAPH) {
|
||||
case SPACE_GRAPH: {
|
||||
SpaceGraph *sipo = area->spacedata.first;
|
||||
return sipo->around;
|
||||
}
|
||||
else if (t->spacetype == SPACE_CLIP) {
|
||||
case SPACE_CLIP: {
|
||||
SpaceClip *sclip = area->spacedata.first;
|
||||
return sclip->around;
|
||||
}
|
||||
else if (t->spacetype == SPACE_SEQ && t->region->regiontype == RGN_TYPE_PREVIEW) {
|
||||
case SPACE_SEQ: {
|
||||
if (t->region->regiontype == RGN_TYPE_PREVIEW) {
|
||||
return SEQ_tool_settings_pivot_point_get(t->scene);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return V3D_AROUND_CENTER_BOUNDS;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue