1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

replaced C array with std::array

This commit is contained in:
Ivan Savenko 2022-11-28 21:20:46 +02:00
parent 6f6d350228
commit a0157d6117

View File

@ -467,16 +467,16 @@ OptionsTab::PlayerOptionsEntry::PlayerOptionsEntry(const PlayerSettings & S, con
else
whoCanPlay = HUMAN;
static std::string flags[] =
{
static const std::array<std::string, PlayerColor::PLAYER_LIMIT_I> flags =
{{
"AOFLGBR.DEF", "AOFLGBB.DEF", "AOFLGBY.DEF", "AOFLGBG.DEF",
"AOFLGBO.DEF", "AOFLGBP.DEF", "AOFLGBT.DEF", "AOFLGBS.DEF"
};
static std::string bgs[] =
{
}};
static const std::array<std::string, PlayerColor::PLAYER_LIMIT_I> bgs =
{{
"ADOPRPNL.bmp", "ADOPBPNL.bmp", "ADOPYPNL.bmp", "ADOPGPNL.bmp",
"ADOPOPNL.bmp", "ADOPPPNL.bmp", "ADOPTPNL.bmp", "ADOPSPNL.bmp"
};
}};
background = std::make_shared<CPicture>(bgs[s.color.getNum()], 0, 0);
labelPlayerName = std::make_shared<CLabel>(55, 10, EFonts::FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE, s.name);