From 3b88ce3dcb32e293650c719eb3f3b628e19c9479 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 23 Jul 2018 17:09:29 -0400 Subject: gl_shader_decompiler: Simplify GetCommonDeclarations() --- src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index ba827181b..e771411ef 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -6,6 +6,9 @@ #include #include #include + +#include + #include "common/assert.h" #include "common/common_types.h" #include "video_core/engines/shader_bytecode.h" @@ -1774,11 +1777,8 @@ private: }; // namespace Decompiler std::string GetCommonDeclarations() { - std::string declarations; - declarations += "#define MAX_CONSTBUFFER_ELEMENTS " + - std::to_string(RasterizerOpenGL::MaxConstbufferSize / (sizeof(GLvec4))); - declarations += '\n'; - return declarations; + return fmt::format("#define MAX_CONSTBUFFER_ELEMENTS {}\n", + RasterizerOpenGL::MaxConstbufferSize / sizeof(GLvec4)); } boost::optional DecompileProgram(const ProgramCode& program_code, u32 main_offset, -- cgit v1.2.3