diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-01-23 19:10:23 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-01-24 09:09:24 +0300 |
commit | fcda27cdaedfcf79607b13dbf5c6fe670e95d2ac (patch) | |
tree | b2c1e96fd987bc0e8d7fb5d3c120cca2d1793717 /source/blender/editors | |
parent | ae213d740da1416df229e06616c883d979cfd640 (diff) |
Cleanup: style
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_cursor.c | 16 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image.c | 5 | ||||
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 8 |
3 files changed, 15 insertions, 14 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index 430ea1cc11d..2d425b7e5a0 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -652,16 +652,12 @@ static void paint_draw_tex_overlay(UnifiedPaintSettings *ups, Brush *brush, } /* set quad color. Colored overlay does not get blending */ - if (col) - glColor4f(1.0, - 1.0, - 1.0, - overlay_alpha / 100.0f); - else - glColor4f(U.sculpt_paint_overlay_col[0], - U.sculpt_paint_overlay_col[1], - U.sculpt_paint_overlay_col[2], - overlay_alpha / 100.0f); + if (col) { + glColor4f(1.0, 1.0, 1.0, overlay_alpha / 100.0f); + } + else { + glColor4f(UNPACK3(U.sculpt_paint_overlay_col), overlay_alpha / 100.0f); + } /* draw textured quad */ glBegin(GL_QUADS); diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index d52b17372f7..df38117f376 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -158,9 +158,10 @@ static void undo_copy_tile(UndoImageTile *tile, ImBuf *tmpibuf, ImBuf *ibuf, Cop } } else { - if (mode == RESTORE_COPY) + if (mode == RESTORE_COPY) { IMB_rectcpy(tmpibuf, ibuf, 0, 0, tile->x * IMAPAINT_TILE_SIZE, - tile->y * IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE); + tile->y * IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE); + } /* swap to the tmpbuf for easy copying */ if (ibuf->rect_float) { SWAP(float *, tmpibuf->rect_float, tile->rect.fp); diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 1cf0316aa06..1185d37f813 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -2537,10 +2537,14 @@ static void text_cursor_set_to_pos(SpaceText *st, ARegion *ar, int x, int y, con y -= txt_get_span(text->lines.first, *linep) - st->top; if (y > 0) { - while (y-- != 0) if ((*linep)->next) *linep = (*linep)->next; + while (y-- != 0) { + if ((*linep)->next) *linep = (*linep)->next; + } } else if (y < 0) { - while (y++ != 0) if ((*linep)->prev) *linep = (*linep)->prev; + while (y++ != 0) { + if ((*linep)->prev) *linep = (*linep)->prev; + } } |