Cleanup: whitespace & break placement

This commit is contained in:
Campbell Barton 2015-07-18 19:02:39 +10:00
parent 2199a3e38b
commit ecb3e0fe73
15 changed files with 81 additions and 64 deletions

@ -1045,16 +1045,17 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType
}
eventData = (GHOST_TEventDataPtr) ibuf;
}
break;
break;
}
default:
return GHOST_kFailure;
break;
}
pushEvent(new GHOST_EventDragnDrop(getMilliSeconds(),eventType,draggedObjectType,window,mouseX,mouseY,eventData));
}
break;
}
default:
return GHOST_kFailure;
}

@ -320,8 +320,9 @@ GHOST_SystemSDL::processEvent(SDL_Event *sdl_event)
g_event = new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowClose, window);
break;
}
}
break;
}
case SDL_QUIT:
g_event = new GHOST_Event(getMilliSeconds(), GHOST_kEventQuit, NULL);
break;
@ -417,8 +418,8 @@ GHOST_SystemSDL::processEvent(SDL_Event *sdl_event)
GHOST_WindowSDL *window = findGhostWindow(SDL_GetWindowFromID_fallback(sdl_sub_evt.windowID));
assert(window != NULL);
g_event = new GHOST_EventWheel(getMilliSeconds(), window, sdl_sub_evt.y);
}
break;
}
case SDL_KEYDOWN:
case SDL_KEYUP:
{
@ -488,9 +489,9 @@ GHOST_SystemSDL::processEvent(SDL_Event *sdl_event)
}
g_event = new GHOST_EventKey(getMilliSeconds(), type, window, gkey, sym, NULL);
}
break;
}
}
if (g_event) {
pushEvent(g_event);

@ -2107,11 +2107,12 @@ static void lib_link_fmodifiers(FileData *fd, ID *id, ListBase *list)
{
FMod_Python *data = (FMod_Python *)fcm->data;
data->script = newlibadr(fd, id->lib, data->script);
}
break;
}
}
}
}
static void lib_link_fcurves(FileData *fd, ID *id, ListBase *list)
{
@ -2166,26 +2167,29 @@ static void direct_link_fmodifiers(FileData *fd, ListBase *list)
if (fd->flags & FD_FLAGS_SWITCH_ENDIAN) {
BLI_endian_switch_float_array(data->coefficients, data->arraysize);
}
}
break;
}
case FMODIFIER_TYPE_ENVELOPE:
{
FMod_Envelope *data= (FMod_Envelope *)fcm->data;
data->data= newdataadr(fd, data->data);
}
break;
}
case FMODIFIER_TYPE_PYTHON:
{
FMod_Python *data = (FMod_Python *)fcm->data;
data->prop = newdataadr(fd, data->prop);
IDP_DirectLinkGroup_OrFree(&data->prop, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
}
break;
}
}
}
}
/* NOTE: this assumes that link_list has already been called on the list */
static void direct_link_fcurves(FileData *fd, ListBase *list)
@ -8375,11 +8379,12 @@ static void expand_fmodifiers(FileData *fd, Main *mainvar, ListBase *list)
FMod_Python *data = (FMod_Python *)fcm->data;
expand_doit(fd, mainvar, data->script);
}
break;
}
}
}
}
static void expand_fcurves(FileData *fd, Main *mainvar, ListBase *list)
{

@ -2401,8 +2401,9 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main)
data->flag |= MINMAX_STICKY;
else
data->flag &= ~MINMAX_STICKY;
}
break;
}
case CONSTRAINT_TYPE_ROTLIKE:
{
bRotateLikeConstraint *data = curcon->data;
@ -2410,11 +2411,12 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main)
/* version patch from buttons_object.c */
if (data->flag == 0)
data->flag = ROTLIKE_X|ROTLIKE_Y|ROTLIKE_Z;
}
break;
}
}
}
}
if (ob->type == OB_ARMATURE) {
if (ob->pose) {

@ -613,8 +613,9 @@ static void write_fmodifiers(WriteData *wd, ListBase *fmodifiers)
/* write coefficients array */
if (data->coefficients)
writedata(wd, DATA, sizeof(float)*(data->arraysize), data->coefficients);
}
break;
}
case FMODIFIER_TYPE_ENVELOPE:
{
FMod_Envelope *data= (FMod_Envelope *)fcm->data;
@ -622,8 +623,9 @@ static void write_fmodifiers(WriteData *wd, ListBase *fmodifiers)
/* write envelope data */
if (data->data)
writestruct(wd, DATA, "FCM_EnvelopeData", data->totvert, data->data);
}
break;
}
case FMODIFIER_TYPE_PYTHON:
{
FMod_Python *data = (FMod_Python *)fcm->data;
@ -631,12 +633,13 @@ static void write_fmodifiers(WriteData *wd, ListBase *fmodifiers)
/* Write ID Properties -- and copy this comment EXACTLY for easy finding
* of library blocks that implement this.*/
IDP_WriteProperty(data->prop, wd);
}
break;
}
}
}
}
}
static void write_fcurves(WriteData *wd, ListBase *fcurves)
{
@ -1425,18 +1428,20 @@ static void write_constraints(WriteData *wd, ListBase *conlist)
/* Write ID Properties -- and copy this comment EXACTLY for easy finding
* of library blocks that implement this.*/
IDP_WriteProperty(data->prop, wd);
}
break;
}
case CONSTRAINT_TYPE_SPLINEIK:
{
bSplineIKConstraint *data = (bSplineIKConstraint *)con->data;
/* write points array */
writedata(wd, DATA, sizeof(float)*(data->numpoints), data->points);
}
break;
}
}
}
/* Write the constraint */
writestruct(wd, DATA, "bConstraint", 1, con);

@ -160,16 +160,18 @@ static bool acf_show_channel_colors(bAnimContext *ac)
{
SpaceAction *saction = (SpaceAction *)ac->sl;
showGroupColors = !(saction->flag & SACTION_NODRAWGCOLORS);
}
break;
}
case SPACE_IPO:
{
SpaceIpo *sipo = (SpaceIpo *)ac->sl;
showGroupColors = !(sipo->flag & SIPO_NODRAWGCOLORS);
}
break;
}
}
}
return showGroupColors;
}

@ -1396,9 +1396,9 @@ static int animchannels_grouping_poll(bContext *C)
/* dopesheet and action only - all others are for other datatypes or have no groups */
if (ELEM(saction->mode, SACTCONT_ACTION, SACTCONT_DOPESHEET) == 0)
return 0;
}
break;
break;
}
case SPACE_IPO:
{
SpaceIpo *sipo = (SpaceIpo *)sl;
@ -1406,9 +1406,9 @@ static int animchannels_grouping_poll(bContext *C)
/* drivers can't have groups... */
if (sipo->mode != SIPO_MODE_ANIMATION)
return 0;
}
break;
break;
}
/* unsupported... */
default:
return 0;

@ -1498,44 +1498,45 @@ static int outliner_data_operation_exec(bContext *C, wmOperator *op)
outliner_do_data_operation(soops, datalevel, event, &soops->tree, pchan_cb, NULL);
WM_event_add_notifier(C, NC_OBJECT | ND_POSE, NULL);
ED_undo_push(C, "PoseChannel operation");
}
break;
break;
}
case TSE_BONE:
{
outliner_do_data_operation(soops, datalevel, event, &soops->tree, bone_cb, NULL);
WM_event_add_notifier(C, NC_OBJECT | ND_POSE, NULL);
ED_undo_push(C, "Bone operation");
}
break;
break;
}
case TSE_EBONE:
{
outliner_do_data_operation(soops, datalevel, event, &soops->tree, ebone_cb, NULL);
WM_event_add_notifier(C, NC_OBJECT | ND_POSE, NULL);
ED_undo_push(C, "EditBone operation");
}
break;
break;
}
case TSE_SEQUENCE:
{
Scene *scene = CTX_data_scene(C);
outliner_do_data_operation(soops, datalevel, event, &soops->tree, sequence_cb, scene);
}
break;
break;
}
case TSE_GP_LAYER:
{
outliner_do_data_operation(soops, datalevel, event, &soops->tree, gp_layer_cb, NULL);
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA, NULL);
ED_undo_push(C, "Grease Pencil Layer operation");
}
break;
break;
}
case TSE_RNA_STRUCT:
if (event == OL_DOP_SELECT_LINKED) {
outliner_do_data_operation(soops, datalevel, event, &soops->tree, data_select_linked_cb, C);
}
break;
default:

@ -548,9 +548,9 @@ static void add_filt_passes(RenderLayer *rl, int curmask, int rectx, int offset,
fp[2]= shr->winspeed[2];
fp[3]= shr->winspeed[3];
}
}
break;
break;
}
case SCE_PASS_RAYHITS:
/* */
col= shr->rayhits;