mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
don't use optional for debugName
This commit is contained in:
@@ -477,11 +477,11 @@ int w_Texture_renderTo(lua_State *L)
|
||||
static int w_Texture_getDebugName(lua_State *L)
|
||||
{
|
||||
Texture *t = luax_checktexture(L, 1);
|
||||
const Optional<std::string> &debugName = t->getDebugName();
|
||||
if (debugName.hasValue)
|
||||
luax_pushstring(L, debugName.value);
|
||||
else
|
||||
const std::string &debugName = t->getDebugName();
|
||||
if (debugName.empty())
|
||||
lua_pushnil(L);
|
||||
else
|
||||
luax_pushstring(L, debugName);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user