From 52e4064fe5bd093892e4c44d4700d7f3548193e9 Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Sun, 6 Oct 2019 02:38:01 +0100 Subject: [PATCH] art.cpp: Use `const_cast` instead of C-style cast --- SourceX/DiabloUI/art.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SourceX/DiabloUI/art.cpp b/SourceX/DiabloUI/art.cpp index 8f77eea73..68839a61c 100644 --- a/SourceX/DiabloUI/art.cpp +++ b/SourceX/DiabloUI/art.cpp @@ -57,7 +57,8 @@ void LoadMaskedArt(const char *pszFile, Art *art, int frames, int mask) void LoadArt(Art *art, const BYTE *artData, int w, int h, int frames) { art->frames = frames; - art->surface = SDL_CreateRGBSurfaceWithFormatFrom((char *)artData, w, h, 8, w, SDL_PIXELFORMAT_INDEX8); + art->surface = SDL_CreateRGBSurfaceWithFormatFrom( + const_cast(artData), w, h, 8, w, SDL_PIXELFORMAT_INDEX8); art->frame_height = h / frames; }