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:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -245,7 +245,7 @@ namespace Nz::GL
|
||||
}
|
||||
}
|
||||
|
||||
bool EGLLoader::ImplementFallback(const std::string_view& /*function*/)
|
||||
bool EGLLoader::ImplementFallback(std::string_view /*function*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user