summaryrefslogtreecommitdiffstatsci
path: root/src
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2022-06-22 06:00:45 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2022-06-22 06:00:45 +0200
commitfae189723237dd5fa3b87bbe421f63a8e7f66ca7 (patch)
tree39d39da5dd747214576b5635f21f42f7b6da77f8 /src
parent14e87d88493de3222f12feb9480907115d3514d2 (diff)
get_matrix with const pointer
Diffstat (limited to 'src')
-rw-r--r--src/vkvg_context.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vkvg_context.c b/src/vkvg_context.c
index 895c546..ea5b1f5 100644
--- a/src/vkvg_context.c
+++ b/src/vkvg_context.c
@@ -1594,8 +1594,8 @@ void vkvg_set_matrix (VkvgContext ctx, const vkvg_matrix_t* matrix){
ctx->pushConsts.mat = (*matrix);
_set_mat_inv_and_vkCmdPush (ctx);
}
-void vkvg_get_matrix (VkvgContext ctx, const vkvg_matrix_t* matrix){
- memcpy ((void*)matrix, &ctx->pushConsts.mat, sizeof(vkvg_matrix_t));
+void vkvg_get_matrix (VkvgContext ctx, vkvg_matrix_t* const matrix){
+ *matrix = ctx->pushConsts.mat;
}
void vkvg_elliptic_arc_to (VkvgContext ctx, float x2, float y2, bool largeArc, bool sweepFlag, float rx, float ry, float phi) {