Core/StringExt: Don't pass string_view by ref

https://quuxplusone.github.io/blog/2021/11/09/pass-string-view-by-value/
This commit is contained in:
SirLynix
2023-08-24 08:23:14 +02:00
parent 1b7a89213d
commit bd53245f42
51 changed files with 115 additions and 115 deletions

View File

@@ -17,7 +17,7 @@
namespace Nz
{
void OpenGLCommandBufferBuilder::BeginDebugRegion(const std::string_view& regionName, const Color& color)
void OpenGLCommandBufferBuilder::BeginDebugRegion(std::string_view regionName, const Color& color)
{
m_commandBuffer.BeginDebugRegion(regionName, color);
}

View File

@@ -88,7 +88,7 @@ namespace Nz
env.glES = (contextParams.type == GL::ContextType::OpenGL_ES);
env.glMajorVersion = contextParams.glMajorVersion;
env.glMinorVersion = contextParams.glMinorVersion;
env.extCallback = [&](const std::string_view& ext)
env.extCallback = [&](std::string_view ext)
{
return context.IsExtensionSupported(std::string(ext));
};

View File

@@ -1027,7 +1027,7 @@ namespace Nz::GL
m_vaoCache.Clear();
}
bool Context::ImplementFallback(const std::string_view& function)
bool Context::ImplementFallback(std::string_view function)
{
SymbolLoader loader(*this);

View File

@@ -296,7 +296,7 @@ namespace Nz::GL
return true;
}
bool EGLContextBase::ImplementFallback(const std::string_view& function)
bool EGLContextBase::ImplementFallback(std::string_view function)
{
if (Context::ImplementFallback(function))
return true;

View File

@@ -245,7 +245,7 @@ namespace Nz::GL
}
}
bool EGLLoader::ImplementFallback(const std::string_view& /*function*/)
bool EGLLoader::ImplementFallback(std::string_view /*function*/)
{
return false;
}

View File

@@ -238,7 +238,7 @@ namespace Nz::GL
return true;
}
bool WGLContext::ImplementFallback(const std::string_view& function)
bool WGLContext::ImplementFallback(std::string_view function)
{
if (Context::ImplementFallback(function))
return true;