matrix: Make matrix const in weston_matrix_transform

This function doesn't need to change the matrix, so we might as well
enforce that.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2022-09-09 11:08:36 -05:00 committed by Pekka Paalanen
parent e5e9980391
commit 3a61976af7
2 changed files with 4 additions and 2 deletions

View File

@ -59,7 +59,8 @@ weston_matrix_translate(struct weston_matrix *matrix,
void
weston_matrix_rotate_xy(struct weston_matrix *matrix, float cos, float sin);
void
weston_matrix_transform(struct weston_matrix *matrix, struct weston_vector *v);
weston_matrix_transform(const struct weston_matrix *matrix,
struct weston_vector *v);
int
weston_matrix_invert(struct weston_matrix *inverse,

View File

@ -110,7 +110,8 @@ weston_matrix_rotate_xy(struct weston_matrix *matrix, float cos, float sin)
/* v <- m * v */
WL_EXPORT void
weston_matrix_transform(struct weston_matrix *matrix, struct weston_vector *v)
weston_matrix_transform(const struct weston_matrix *matrix,
struct weston_vector *v)
{
int i, j;
struct weston_vector t;