From 8b43dff8493f797604d28e3a779edfa8dd381144 Mon Sep 17 00:00:00 2001 From: Mat M Date: Tue, 21 Apr 2020 21:31:58 -0400 Subject: [PATCH] gl_shader_gen: Convert file-scope std::string into a std::string_view (#5263) Same behavior, no heap allocations at program start up --- src/video_core/renderer_opengl/gl_shader_gen.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video_core/renderer_opengl/gl_shader_gen.cpp b/src/video_core/renderer_opengl/gl_shader_gen.cpp index 08015d5fc0..4879779aad 100644 --- a/src/video_core/renderer_opengl/gl_shader_gen.cpp +++ b/src/video_core/renderer_opengl/gl_shader_gen.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include "common/assert.h" #include "common/bit_field.h" #include "common/bit_set.h" @@ -30,7 +31,7 @@ using VSOutputAttributes = RasterizerRegs::VSOutputAttributes; namespace OpenGL { -static const std::string UniformBlockDef = R"( +constexpr std::string_view UniformBlockDef = R"( #define NUM_TEV_STAGES 6 #define NUM_LIGHTS 8 #define NUM_LIGHTING_SAMPLERS 24