mirror of
https://github.com/love2d/love.git
synced 2026-08-14 01:20:56 +02:00
The Variant class is now meant to be used on the stack instead of allocated on the heap. As a result (and because of related changes), performance of Channels has roughly doubled when pushing and popping most types.
This commit is contained in:
@@ -95,14 +95,11 @@ int w_clear(lua_State *)
|
||||
|
||||
int w_quit(lua_State *L)
|
||||
{
|
||||
std::vector<StrongRef<Variant>> args;
|
||||
std::vector<Variant> args;
|
||||
|
||||
Variant *v = Variant::fromLua(L, 1);
|
||||
if (v)
|
||||
{
|
||||
Variant v;
|
||||
if (Variant::fromLua(L, 1, &v))
|
||||
args.push_back(v);
|
||||
v->release();
|
||||
}
|
||||
|
||||
Message *m = new Message("quit", args);
|
||||
instance()->push(m);
|
||||
|
||||
Reference in New Issue
Block a user