From 7096f99f7992481c0cbb1e006501c9946a61dad2 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 31 Jan 2024 22:55:41 -0500 Subject: [PATCH] CustomPipeline: Mark arrays as constexpr Ensures that these go into the ro section. --- .../GraphicsModSystem/Runtime/CustomPipeline.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomPipeline.cpp b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomPipeline.cpp index 178719ba2d..46ca20cc38 100644 --- a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomPipeline.cpp +++ b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomPipeline.cpp @@ -17,15 +17,17 @@ namespace { bool IsQualifier(std::string_view value) { - static std::array qualifiers = {"attribute", "const", "highp", "lowp", - "mediump", "uniform", "varying"}; + static constexpr std::array qualifiers = { + "attribute", "const", "highp", "lowp", "mediump", "uniform", "varying", + }; return std::find(qualifiers.begin(), qualifiers.end(), value) != qualifiers.end(); } bool IsBuiltInMacro(std::string_view value) { - static std::array built_in = {"__LINE__", "__FILE__", "__VERSION__", - "GL_core_profile", "GL_compatibility_profile"}; + static constexpr std::array built_in = { + "__LINE__", "__FILE__", "__VERSION__", "GL_core_profile", "GL_compatibility_profile", + }; return std::find(built_in.begin(), built_in.end(), value) != built_in.end(); }