diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-12-30 07:14:00 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-12-30 07:15:05 +0300 |
commit | 543ddbe6bfa8072b4c09ccc9abe27237d3598db5 (patch) | |
tree | 3d7ca08c1c16389e803721597817f11c53325523 /source/blender/editors/gpencil | |
parent | 266b1e2cdbc19466ac452cc3cb08273d6f37b341 (diff) |
Cleanup: warnings (clang)
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/annotate_paint.c | 4 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_intern.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c index a868e98e3dd..b6f81c81823 100644 --- a/source/blender/editors/gpencil/annotate_paint.c +++ b/source/blender/editors/gpencil/annotate_paint.c @@ -1697,8 +1697,8 @@ static void gpencil_draw_apply_event(wmOperator *op, const wmEvent *event, Depsg /* verify key status for straight lines */ if ((event->ctrl > 0) || (event->alt > 0)) { if (p->straight[0] == 0) { - int dx = abs(p->mval[0] - p->mvalo[0]); - int dy = abs(p->mval[1] - p->mvalo[1]); + int dx = abs((int)(p->mval[0] - p->mvalo[0])); + int dy = abs((int)(p->mval[1] - p->mvalo[1])); if ((dx > 0) || (dy > 0)) { /* check mouse direction to replace the other coordinate with previous values */ if (dx >= dy) { diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h index 71d293d5244..aaeb2603acc 100644 --- a/source/blender/editors/gpencil/gpencil_intern.h +++ b/source/blender/editors/gpencil/gpencil_intern.h @@ -508,7 +508,7 @@ struct GP_EditableStrokes_Iter { */ #define GP_EDITABLE_STROKES_BEGIN(gpstroke_iter, C, gpl, gps) \ { \ - struct GP_EditableStrokes_Iter gpstroke_iter = {0}; \ + struct GP_EditableStrokes_Iter gpstroke_iter = {{{0}}}; \ Depsgraph *depsgraph_ = CTX_data_depsgraph(C); \ Object *obact_ = CTX_data_active_object(C); \ bGPdata *gpd_ = CTX_data_gpencil_data(C); \ |