CSplashScreen: Make use of std::array where applicable

Same behavior, stronger typing.
This commit is contained in:
Lioncash 2020-04-12 11:30:04 -04:00
parent f74471f603
commit 96e3eaf726
1 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,7 @@
#include "Runtime/GuiSys/CSplashScreen.hpp" #include "Runtime/GuiSys/CSplashScreen.hpp"
#include <array>
#include "Runtime/CArchitectureMessage.hpp" #include "Runtime/CArchitectureMessage.hpp"
#include "Runtime/CArchitectureQueue.hpp" #include "Runtime/CArchitectureQueue.hpp"
#include "Runtime/CSimplePool.hpp" #include "Runtime/CSimplePool.hpp"
@ -8,12 +10,12 @@
namespace urde { namespace urde {
static const char* SplashTextures[]{"TXTR_NintendoLogo", "TXTR_RetroLogo", "TXTR_DolbyLogo"}; constexpr std::array SplashTextures{"TXTR_NintendoLogo"sv, "TXTR_RetroLogo"sv, "TXTR_DolbyLogo"sv};
CSplashScreen::CSplashScreen(ESplashScreen which) CSplashScreen::CSplashScreen(ESplashScreen which)
: CIOWin("SplashScreen") : CIOWin("SplashScreen")
, x14_which(which) , x14_which(which)
, m_quad(EFilterType::Blend, g_SimplePool->GetObj(SplashTextures[int(which)])) {} , m_quad(EFilterType::Blend, g_SimplePool->GetObj(SplashTextures[size_t(which)])) {}
CIOWin::EMessageReturn CSplashScreen::OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue) { CIOWin::EMessageReturn CSplashScreen::OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue) {
switch (msg.GetType()) { switch (msg.GetType()) {