From a4181a67302c01f99f22e3115729fc4b0c7fb871 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Thu, 28 Dec 2023 12:19:05 +0100 Subject: [PATCH] mtk: Mark mtk_rectangle_to_graphene_rect in-variable as const To silence occasional compiler warnings. Fixes: a93471eb90 ("mtk: Move Rectangle.to_graphene_rect from Meta") Part-of: --- mtk/mtk/mtk-rectangle.c | 2 +- mtk/mtk/mtk-rectangle.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mtk/mtk/mtk-rectangle.c b/mtk/mtk/mtk-rectangle.c index 7b9b0f213..70cf62c6c 100644 --- a/mtk/mtk/mtk-rectangle.c +++ b/mtk/mtk/mtk-rectangle.c @@ -286,7 +286,7 @@ mtk_rectangle_contains_rect (const MtkRectangle *outer_rect, * Returns: Return a graphene_rect_t created from `rect` */ graphene_rect_t -mtk_rectangle_to_graphene_rect (MtkRectangle *rect) +mtk_rectangle_to_graphene_rect (const MtkRectangle *rect) { return (graphene_rect_t) { .origin = { diff --git a/mtk/mtk/mtk-rectangle.h b/mtk/mtk/mtk-rectangle.h index e8c5f59ab..0c9215fba 100644 --- a/mtk/mtk/mtk-rectangle.h +++ b/mtk/mtk/mtk-rectangle.h @@ -117,7 +117,7 @@ gboolean mtk_rectangle_contains_rect (const MtkRectangle *outer_rect, const MtkRectangle *inner_rect); MTK_EXPORT -graphene_rect_t mtk_rectangle_to_graphene_rect (MtkRectangle *rect); +graphene_rect_t mtk_rectangle_to_graphene_rect (const MtkRectangle *rect); MTK_EXPORT void mtk_rectangle_from_graphene_rect (const graphene_rect_t *rect,