mirror of https://github.com/Chlumsky/msdfgen.git
Change msdf_shape_add_contour to use a const handle
This commit is contained in:
parent
ef7cdfcb69
commit
de0d52a9be
|
|
@ -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<msdfgen::Shape*>(shape)->addContour(*reinterpret_cast<msdfgen::Contour*>(contour));
|
||||
reinterpret_cast<msdfgen::Shape*>(shape)->addContour(*reinterpret_cast<const msdfgen::Contour*>(contour));
|
||||
return MSDF_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue