From 4e1c0e8fba456b2050c672c9c2c876987f03a3e6 Mon Sep 17 00:00:00 2001 From: Ben Wagner Date: Mon, 5 Jun 2023 11:53:34 -0400 Subject: [PATCH] Mark FT_Renderer_Class::raster_class as pointer to const The `FT_DEFINE_RASTER_FUNCS` macro declares a `const FT_Raster_Funcs`. The address of the definition is taken and assigned to `FT_Renderer_Class::raster_class` which is currently `FT_Raster_Funcs*`. Until recently the `const` was cast away and with the removal of the cast there are now warnings about dropping this `const`. Instead of adding back the casts, make `FT_Renderer_Class::raster_class` a pointer to const, as is done with pointers in other interfaces. * include/freetype/ftrender.h (FT_Renderer_Class_): mark `raster_class` as const. --- include/freetype/ftrender.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/freetype/ftrender.h b/include/freetype/ftrender.h index a8576dab0..0b6fad32e 100644 --- a/include/freetype/ftrender.h +++ b/include/freetype/ftrender.h @@ -158,7 +158,7 @@ FT_BEGIN_HEADER FT_Renderer_GetCBoxFunc get_glyph_cbox; FT_Renderer_SetModeFunc set_mode; - FT_Raster_Funcs* raster_class; + const FT_Raster_Funcs* raster_class; } FT_Renderer_Class;