Browse Source

art.cpp: Use `const_cast` instead of C-style cast

pull/330/head
Gleb Mazovetskiy 7 years ago committed by Anders Jenbo
parent
commit
52e4064fe5
  1. 3
      SourceX/DiabloUI/art.cpp

3
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<BYTE *>(artData), w, h, 8, w, SDL_PIXELFORMAT_INDEX8);
art->frame_height = h / frames;
}

Loading…
Cancel
Save