1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00

Make some non-const static variables const or constexpr

This commit is contained in:
Ivan Savenko
2024-02-12 13:22:54 +02:00
parent 6db405167d
commit 6e399eb21a
15 changed files with 20 additions and 22 deletions

View File

@ -157,11 +157,11 @@ SDL_Surface * BitmapHandler::loadBitmapFromDir(const ImagePath & path)
ret->format->palette->colors[0].g == 0 &&
ret->format->palette->colors[0].b == 255 )
{
static SDL_Color shadow[3] =
constexpr std::array shadow =
{
{ 0, 0, 0, 0},// 100% - transparency
{ 0, 0, 0, 32},// 75% - shadow border,
{ 0, 0, 0, 128},// 50% - shadow body
SDL_Color{ 0, 0, 0, 0},// 100% - transparency
SDL_Color{ 0, 0, 0, 32},// 75% - shadow border,
SDL_Color{ 0, 0, 0, 128},// 50% - shadow body
};
CSDL_Ext::setColorKey(ret, ret->format->palette->colors[0]);