mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-20 12:55:45 +00:00
yuzu_cmd: Use string_view instead of string for extensions
Avoids potential allocations due to the usage of std::string on strings that we know at compile time. Most of these might fit in SSO, but it adds complexity that can be easily avoided with string views.
This commit is contained in:
parent
1bb64655cb
commit
bc60f6daba
1 changed files with 3 additions and 3 deletions
|
@ -50,7 +50,7 @@ private:
|
|||
};
|
||||
|
||||
bool EmuWindow_SDL2_GL::SupportsRequiredGLExtensions() {
|
||||
std::vector<std::string> unsupported_ext;
|
||||
std::vector<std::string_view> unsupported_ext;
|
||||
|
||||
if (!GLAD_GL_ARB_buffer_storage)
|
||||
unsupported_ext.push_back("ARB_buffer_storage");
|
||||
|
@ -73,8 +73,8 @@ bool EmuWindow_SDL2_GL::SupportsRequiredGLExtensions() {
|
|||
if (!GLAD_GL_ARB_depth_buffer_float)
|
||||
unsupported_ext.push_back("ARB_depth_buffer_float");
|
||||
|
||||
for (const std::string& ext : unsupported_ext)
|
||||
LOG_CRITICAL(Frontend, "Unsupported GL extension: {}", ext);
|
||||
for (const auto& extension : unsupported_ext)
|
||||
LOG_CRITICAL(Frontend, "Unsupported GL extension: {}", extension);
|
||||
|
||||
return unsupported_ext.empty();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue