[Bf-blender-cvs] [5195f03ca12] blender2.8: Cleanup: style, use ARRAY_SET_ITEMS macro
Campbell Barton
noreply at git.blender.org
Sun Nov 4 21:18:21 CET 2018
Commit: 5195f03ca129a417524280278e87257dc8188646
Author: Campbell Barton
Date: Mon Nov 5 07:11:23 2018 +1100
Branches: blender2.8
https://developer.blender.org/rB5195f03ca129a417524280278e87257dc8188646
Cleanup: style, use ARRAY_SET_ITEMS macro
===================================================================
M source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
===================================================================
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
index d388b617d60..f255892de44 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
@@ -621,38 +621,23 @@ static void set_grid_point(
float pos[3];
/* Set the grid in the selected axis */
- switch (axis)
- {
+ switch (axis) {
case GP_LOCKAXIS_X:
{
- pos[0] = 0.0f;
- pos[1] = v1;
- pos[2] = v2;
+ ARRAY_SET_ITEMS(pos, 0.0f, v1, v2);
break;
}
case GP_LOCKAXIS_Y:
{
- pos[0] = v1;
- pos[1] = 0.0f;
- pos[2] = v2;
+ ARRAY_SET_ITEMS(pos, v1, 0.0f, v2);
break;
}
case GP_LOCKAXIS_Z:
+ default: /* view aligned */
{
- pos[0] = v1;
- pos[1] = v2;
- pos[2] = 0.0f;
+ ARRAY_SET_ITEMS(pos, v1, v2, 0.0f);
break;
}
- default:
- {
- /* aligned to view */
- pos[0] = v1;
- pos[1] = v2;
- pos[2] = 0.0f;
- break;
- }
-
}
GPU_vertbuf_attr_set(vbo, pos_id, idx, pos);
More information about the Bf-blender-cvs
mailing list