Fixed C casts to reinterpret cast in window icon deletion

This commit is contained in:
Daemo
2026-08-28 16:58:55 +02:00
parent bd7cd52c4f
commit ff1a0bb4cb
+2 -2
View File
@@ -82,7 +82,7 @@ namespace mlx
SDL_DestroyWindow(infos->window);
if(infos->icon != nullptr)
{
delete[] (mlx_color*)infos->icon->pixels;
delete[] reinterpret_cast<mlx_color*>(infos->icon->pixels);
SDL_FreeSurface(infos->icon);
}
@@ -167,7 +167,7 @@ namespace mlx
Internal::WindowInfos* infos = static_cast<Internal::WindowInfos*>(window);
if(infos->icon != nullptr)
{
delete[] (mlx_color*)infos->icon->pixels;
delete[] reinterpret_cast<mlx_color*>(infos->icon->pixels);
SDL_FreeSurface(infos->icon);
}