VERY experimental Nintendo Switch 2 emulator
C++
glsl_shader_decompiler: Append indentation without constructing a separate std::string
Lioncash21fa39b4f628
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cppindex 6233ee3585..389a23edb6 100644--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp@@ -112,7 +112,7 @@ public:void AddLine(const std::string& text) {DEBUG_ASSERT(scope >= 0);if (!text.empty()) {- shader_source += std::string(static_cast<size_t>(scope) * 4, ' ');+ AppendIndentation();}shader_source += text + '\n';}@@ -124,6 +124,10 @@ public:int scope = 0;private:+ void AppendIndentation() {+ shader_source.append(static_cast<size_t>(scope) * 4, ' ');+ }+std::string shader_source;};