diff options
author | Lioncash <mathew1800@gmail.com> | 2018-04-20 01:59:20 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-04-20 01:59:25 +0200 |
commit | 4ef392906b4e91433587eab6a2654908081aea6a (patch) | |
tree | 8df3fdcab70adc2cf876cbdb668b758bbc187b53 /src | |
parent | Merge pull request #348 from jlachniet/patch-1 (diff) | |
download | yuzu-4ef392906b4e91433587eab6a2654908081aea6a.tar yuzu-4ef392906b4e91433587eab6a2654908081aea6a.tar.gz yuzu-4ef392906b4e91433587eab6a2654908081aea6a.tar.bz2 yuzu-4ef392906b4e91433587eab6a2654908081aea6a.tar.lz yuzu-4ef392906b4e91433587eab6a2654908081aea6a.tar.xz yuzu-4ef392906b4e91433587eab6a2654908081aea6a.tar.zst yuzu-4ef392906b4e91433587eab6a2654908081aea6a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 6233ee358..389a23edb 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; }; |