Cleanup: clang-format

This commit is contained in:
Campbell Barton
2019-10-07 15:17:44 +11:00
parent 805ba9fc81
commit 60f0a94ab2
8 changed files with 20 additions and 22 deletions

View File

@@ -1383,8 +1383,7 @@ bool GHOST_SystemCocoa::handleOpenDocumentRequest(void *filepathStr)
// Check open windows if some changes are not saved
if (m_windowManager->getAnyModifiedState()) {
@autoreleasepool
{
@autoreleasepool {
NSAlert *alert = [[NSAlert alloc] init];
NSString *title = [NSString stringWithFormat:@"Opening %@", [filepath lastPathComponent]];
NSString *text = @"Current document has not been saved.\nDo you really want to proceed?";

View File

@@ -31,7 +31,6 @@ struct Main;
struct Scene;
struct ToolSettings;
struct UnifiedPaintSettings;
struct bContext;
// enum eCurveMappingPreset;

View File

@@ -4911,9 +4911,10 @@ static void ui_draw_popover_back_impl(const uiWidgetColors *wcol,
{
/* tsk, this isn't nice. */
const float unit_half = unit_size / 2;
const float cent_x = mval_origin ?
CLAMPIS(mval_origin[0], rect->xmin + unit_size, rect->xmax - unit_size) :
BLI_rcti_cent_x(rect);
const float cent_x = mval_origin ? CLAMPIS(mval_origin[0],
rect->xmin + unit_size,
rect->xmax - unit_size) :
BLI_rcti_cent_x(rect);
rect->ymax -= unit_half;
rect->ymin += unit_half;

View File

@@ -29,7 +29,6 @@ struct Brush;
struct ColorManagedDisplay;
struct ColorSpace;
struct ImagePool;
struct ListBase;
struct MTex;
struct Object;
struct Paint;
@@ -37,7 +36,6 @@ struct PaintStroke;
struct PointerRNA;
struct RegionView3D;
struct Scene;
struct UndoStep;
struct VPaint;
struct ViewContext;
struct bContext;

View File

@@ -891,7 +891,7 @@ static void node_group_make_insert_selected(const bContext *C, bNodeTree *ntree,
}
}
if (sock->flag & (SOCK_HIDDEN | SOCK_UNAVAIL)) {
skip = true;
skip = true;
}
if (skip) {
continue;
@@ -915,7 +915,7 @@ static void node_group_make_insert_selected(const bContext *C, bNodeTree *ntree,
}
}
if (sock->flag & (SOCK_HIDDEN | SOCK_UNAVAIL)) {
skip = true;
skip = true;
}
if (skip) {
continue;

View File

@@ -1708,7 +1708,8 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
}
else {
/* Release confirms preference should not affect node editor (T69288, T70504). */
if (ISMOUSE(t->launch_event) && ((U.flag & USER_RELEASECONFIRM) || (t->spacetype == SPACE_NODE))) {
if (ISMOUSE(t->launch_event) &&
((U.flag & USER_RELEASECONFIRM) || (t->spacetype == SPACE_NODE))) {
/* Global "release confirm" on mouse bindings */
t->flag |= T_RELEASE_CONFIRM;
}

View File

@@ -48,16 +48,16 @@ static int node_shader_gpu_geometry(GPUMaterial *mat,
GPUNodeLink *orco_link = (!out[2].hasoutput) ? GPU_constant(val) : GPU_attribute(CD_ORCO, "");
const bool success = GPU_stack_link(mat,
node,
"node_geometry",
in,
out,
GPU_builtin(GPU_VIEW_POSITION),
GPU_builtin(GPU_WORLD_NORMAL),
orco_link,
GPU_builtin(GPU_OBJECT_MATRIX),
GPU_builtin(GPU_INVERSE_VIEW_MATRIX),
bary_link);
node,
"node_geometry",
in,
out,
GPU_builtin(GPU_VIEW_POSITION),
GPU_builtin(GPU_WORLD_NORMAL),
orco_link,
GPU_builtin(GPU_OBJECT_MATRIX),
GPU_builtin(GPU_INVERSE_VIEW_MATRIX),
bary_link);
/* for each output */
for (int i = 0; sh_node_geometry_out[i].type != -1; i++) {

View File

@@ -68,8 +68,8 @@ set(SRC
intern/wm_operator_type.c
intern/wm_operators.c
intern/wm_panel_type.c
intern/wm_playanim.c
intern/wm_platform_support.c
intern/wm_playanim.c
intern/wm_splash_screen.c
intern/wm_stereo.c
intern/wm_subwindow.c