yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

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).
This commit is contained in:
Lioncash 2019-10-15 19:00:20 -04:00
parent 04a1161354
commit 67df3f7742
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}