mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Simplified an internal Variant constructor to be more intuitive to use.
--HG-- branch : minor
This commit is contained in:
@@ -85,10 +85,10 @@ Variant::Variant(love::Type *udatatype, void *userdata)
|
||||
{
|
||||
if (udatatype != nullptr)
|
||||
{
|
||||
Proxy *p = (Proxy *) userdata;
|
||||
data.userdata = p->object;
|
||||
if (p->object)
|
||||
p->object->retain();
|
||||
love::Object *o = (love::Object *) userdata;
|
||||
data.userdata = o;
|
||||
if (o != nullptr)
|
||||
o->retain();
|
||||
}
|
||||
else
|
||||
data.userdata = userdata;
|
||||
|
||||
Reference in New Issue
Block a user