From de0d52a9bee6e2e948a0d5a25fa28ee7a36f5edf Mon Sep 17 00:00:00 2001 From: KitsuneAlex Date: Mon, 6 May 2024 23:50:41 +0200 Subject: [PATCH] Change msdf_shape_add_contour to use a const handle --- core/msdfgen-c.cpp | 4 ++-- msdfgen-c.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/msdfgen-c.cpp b/core/msdfgen-c.cpp index e7cce33..9b802c4 100644 --- a/core/msdfgen-c.cpp +++ b/core/msdfgen-c.cpp @@ -205,11 +205,11 @@ MSDF_API int msdf_shape_get_bounds(msdf_shape_const_handle shape, msdf_bounds_t* return MSDF_SUCCESS; } -MSDF_API int msdf_shape_add_contour(msdf_shape_handle shape, msdf_contour_handle contour) { +MSDF_API int msdf_shape_add_contour(msdf_shape_handle shape, msdf_contour_const_handle contour) { if(shape == nullptr || contour == nullptr) { return MSDF_ERR_INVALID_ARG; } - reinterpret_cast(shape)->addContour(*reinterpret_cast(contour)); + reinterpret_cast(shape)->addContour(*reinterpret_cast(contour)); return MSDF_SUCCESS; } diff --git a/msdfgen-c.h b/msdfgen-c.h index f668e66..67ab638 100644 --- a/msdfgen-c.h +++ b/msdfgen-c.h @@ -221,7 +221,7 @@ MSDF_API int msdf_shape_get_bounds(msdf_shape_const_handle shape, msdf_bounds_t* * @param contour A pointer to the contour to add to the shape. * @returns @code MSDF_SUCCESS@endcode on success, otherwise one of the constants prefixed with @code MSDF_ERR_@endcode. */ -MSDF_API int msdf_shape_add_contour(msdf_shape_handle shape, msdf_contour_handle contour); +MSDF_API int msdf_shape_add_contour(msdf_shape_handle shape, msdf_contour_const_handle contour); /** * Retrieves the number of contours allocated within the given shape object.