diff --git a/src/ui/character_create_screen.cpp b/src/ui/character_create_screen.cpp index 4a9cda9e..415bd493 100644 --- a/src/ui/character_create_screen.cpp +++ b/src/ui/character_create_screen.cpp @@ -14,7 +14,7 @@ namespace wowee { namespace ui { // Full WotLK race/class lists (used as defaults when no expansion constraints set) -static const game::Race kAllRaces[] = { +static constexpr game::Race kAllRaces[] = { // Alliance game::Race::HUMAN, game::Race::DWARF, game::Race::NIGHT_ELF, game::Race::GNOME, game::Race::DRAENEI, @@ -25,7 +25,7 @@ static const game::Race kAllRaces[] = { static constexpr int kAllRaceCount = 10; static constexpr int kAllianceCount = 5; -static const game::Class kAllClasses[] = { +static constexpr game::Class kAllClasses[] = { game::Class::WARRIOR, game::Class::PALADIN, game::Class::HUNTER, game::Class::ROGUE, game::Class::PRIEST, game::Class::DEATH_KNIGHT, game::Class::SHAMAN, game::Class::MAGE, game::Class::WARLOCK, diff --git a/src/ui/inventory_screen.cpp b/src/ui/inventory_screen.cpp index 4a74207f..a7550a39 100644 --- a/src/ui/inventory_screen.cpp +++ b/src/ui/inventory_screen.cpp @@ -1303,7 +1303,7 @@ void InventoryScreen::renderCharacterScreen(game::GameHandler& gameHandler) { const char* label; uint32_t categoryId; }; - static const CategoryGroup groups[] = { + static constexpr CategoryGroup groups[] = { { "Weapon Skills", 6 }, { "Armor Skills", 8 }, { "Secondary Skills", 10 }, @@ -1537,7 +1537,7 @@ void InventoryScreen::renderReputationPanel(game::GameHandler& gameHandler) { int32_t ceiling; // raw value where the next tier begins ImVec4 color; }; - static const RepTier tiers[] = { + static constexpr RepTier tiers[] = { { "Hated", -42000, -6001, ImVec4(0.6f, 0.1f, 0.1f, 1.0f) }, { "Hostile", -6000, -3001, ImVec4(0.8f, 0.2f, 0.1f, 1.0f) }, { "Unfriendly", -3000, -1, ImVec4(0.9f, 0.5f, 0.1f, 1.0f) }, @@ -1644,13 +1644,13 @@ void InventoryScreen::renderEquipmentPanel(game::Inventory& inventory) { ImGui::TextColored(ui::colors::kWarmGold, "Equipment"); ImGui::Separator(); - static const game::EquipSlot leftSlots[] = { + static constexpr game::EquipSlot leftSlots[] = { game::EquipSlot::HEAD, game::EquipSlot::NECK, game::EquipSlot::SHOULDERS, game::EquipSlot::BACK, game::EquipSlot::CHEST, game::EquipSlot::SHIRT, game::EquipSlot::TABARD, game::EquipSlot::WRISTS, }; - static const game::EquipSlot rightSlots[] = { + static constexpr game::EquipSlot rightSlots[] = { game::EquipSlot::HANDS, game::EquipSlot::WAIST, game::EquipSlot::LEGS, game::EquipSlot::FEET, game::EquipSlot::RING1, game::EquipSlot::RING2, @@ -1735,7 +1735,7 @@ void InventoryScreen::renderEquipmentPanel(game::Inventory& inventory) { ImGui::Spacing(); ImGui::Separator(); - static const game::EquipSlot weaponSlots[] = { + static constexpr game::EquipSlot weaponSlots[] = { game::EquipSlot::MAIN_HAND, game::EquipSlot::OFF_HAND, game::EquipSlot::RANGED,