diff options
author | Lioncash <mathew1800@gmail.com> | 2019-10-15 19:00:20 -0400 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-10-15 19:00:48 -0400 |
commit | 67df3f7742187abb34d9a2eb4633334331c3318e (patch) | |
tree | 16cb5eaae86cb451fcefa93d0f7d0f0585ea924a /src | |
parent | 04a1161354e9032e36d48d112e40dce2428b049d (diff) |
gl_shader_decompiler: Use a std::string_view with GetDeclarationWithSuffix()
This allows the function to be completely non-allocating for inputs of
all sizes (i.e. there's no heap cost for an input to convert to a
std::string_view).
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 2 |
1 files changed, 1 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 bd0c5c5d6..2c50ed538 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -2246,7 +2246,7 @@ private: code.AddLine("#ifdef SAMPLER_{}_IS_BUFFER", sampler.GetIndex()); } - std::string GetDeclarationWithSuffix(u32 index, const std::string& name) const { + std::string GetDeclarationWithSuffix(u32 index, std::string_view name) const { return fmt::format("{}_{}_{}", name, index, suffix); } |