From 96e3eaf726a7d846aeb1b0465d88b308129f53af Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 12 Apr 2020 11:30:04 -0400 Subject: [PATCH] CSplashScreen: Make use of std::array where applicable Same behavior, stronger typing. --- Runtime/GuiSys/CSplashScreen.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Runtime/GuiSys/CSplashScreen.cpp b/Runtime/GuiSys/CSplashScreen.cpp index 9c36cd163..f4fd01a50 100644 --- a/Runtime/GuiSys/CSplashScreen.cpp +++ b/Runtime/GuiSys/CSplashScreen.cpp @@ -1,5 +1,7 @@ #include "Runtime/GuiSys/CSplashScreen.hpp" +#include + #include "Runtime/CArchitectureMessage.hpp" #include "Runtime/CArchitectureQueue.hpp" #include "Runtime/CSimplePool.hpp" @@ -8,12 +10,12 @@ 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) : CIOWin("SplashScreen") , 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) { switch (msg.GetType()) {