mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-10 12:44:53 +00:00
Remove unneeded lua stack pops
This commit is contained in:
parent
28595a410d
commit
711741a358
@ -93,7 +93,6 @@ int WebSocket_sendText(lua_State* L)
|
|||||||
const char* buf = lua_tolstring(L, i, &bufLen);
|
const char* buf = lua_tolstring(L, i, &bufLen);
|
||||||
data.write(buf, bufLen);
|
data.write(buf, bufLen);
|
||||||
}
|
}
|
||||||
lua_pop(L, argc);
|
|
||||||
|
|
||||||
ws->sendText(data.str());
|
ws->sendText(data.str());
|
||||||
return 0;
|
return 0;
|
||||||
@ -110,7 +109,6 @@ int WebSocket_sendBinary(lua_State* L)
|
|||||||
const char* buf = lua_tolstring(L, i, &bufLen);
|
const char* buf = lua_tolstring(L, i, &bufLen);
|
||||||
data.write(buf, bufLen);
|
data.write(buf, bufLen);
|
||||||
}
|
}
|
||||||
lua_pop(L, argc);
|
|
||||||
|
|
||||||
ws->sendBinary(data.str());
|
ws->sendBinary(data.str());
|
||||||
return 0;
|
return 0;
|
||||||
@ -119,7 +117,6 @@ int WebSocket_sendBinary(lua_State* L)
|
|||||||
int WebSocket_connect(lua_State* L)
|
int WebSocket_connect(lua_State* L)
|
||||||
{
|
{
|
||||||
auto ws = get_ptr<ix::WebSocket>(L, 1);
|
auto ws = get_ptr<ix::WebSocket>(L, 1);
|
||||||
lua_pop(L, 1);
|
|
||||||
ws->start();
|
ws->start();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -127,7 +124,6 @@ int WebSocket_connect(lua_State* L)
|
|||||||
int WebSocket_close(lua_State* L)
|
int WebSocket_close(lua_State* L)
|
||||||
{
|
{
|
||||||
auto ws = get_ptr<ix::WebSocket>(L, 1);
|
auto ws = get_ptr<ix::WebSocket>(L, 1);
|
||||||
lua_pop(L, 1);
|
|
||||||
ws->stop();
|
ws->stop();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -135,7 +131,6 @@ int WebSocket_close(lua_State* L)
|
|||||||
int WebSocket_get_url(lua_State* L)
|
int WebSocket_get_url(lua_State* L)
|
||||||
{
|
{
|
||||||
auto ws = get_ptr<ix::WebSocket>(L, 1);
|
auto ws = get_ptr<ix::WebSocket>(L, 1);
|
||||||
lua_pop(L, 1);
|
|
||||||
lua_pushstring(L, ws->getUrl().c_str());
|
lua_pushstring(L, ws->getUrl().c_str());
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user