mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
don't use optional for debugName
This commit is contained in:
@@ -164,8 +164,8 @@ bool Buffer::load(const void *initialdata)
|
||||
glTexBuffer(target, glformat, buffer);
|
||||
}
|
||||
|
||||
if (debugName.hasValue)
|
||||
glObjectLabel(GL_BUFFER, buffer, -1, debugName.value.c_str());
|
||||
if (!debugName.empty())
|
||||
glObjectLabel(GL_BUFFER, buffer, -1, debugName.c_str());
|
||||
|
||||
return (glGetError() == GL_NO_ERROR);
|
||||
}
|
||||
|
||||
@@ -422,12 +422,12 @@ bool Texture::loadVolatile()
|
||||
|
||||
setGraphicsMemorySize(memsize);
|
||||
|
||||
if (debugName.hasValue)
|
||||
if (!debugName.empty())
|
||||
{
|
||||
if (texture)
|
||||
glObjectLabel(GL_TEXTURE, texture, -1, debugName.value.c_str());
|
||||
glObjectLabel(GL_TEXTURE, texture, -1, debugName.c_str());
|
||||
else
|
||||
glObjectLabel(GL_FRAMEBUFFER, renderbuffer, -1, debugName.value.c_str());
|
||||
glObjectLabel(GL_FRAMEBUFFER, renderbuffer, -1, debugName.c_str());
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user