From 711741a35880bbf6ba7ff066a2d9cf2cbcbce4b0 Mon Sep 17 00:00:00 2001 From: lampysprites Date: Sun, 3 Oct 2021 02:22:15 +0700 Subject: [PATCH] Remove unneeded lua stack pops --- src/app/script/websocket_class.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/app/script/websocket_class.cpp b/src/app/script/websocket_class.cpp index 1869fd40b..c7743916c 100644 --- a/src/app/script/websocket_class.cpp +++ b/src/app/script/websocket_class.cpp @@ -93,7 +93,6 @@ int WebSocket_sendText(lua_State* L) const char* buf = lua_tolstring(L, i, &bufLen); data.write(buf, bufLen); } - lua_pop(L, argc); ws->sendText(data.str()); return 0; @@ -110,7 +109,6 @@ int WebSocket_sendBinary(lua_State* L) const char* buf = lua_tolstring(L, i, &bufLen); data.write(buf, bufLen); } - lua_pop(L, argc); ws->sendBinary(data.str()); return 0; @@ -119,7 +117,6 @@ int WebSocket_sendBinary(lua_State* L) int WebSocket_connect(lua_State* L) { auto ws = get_ptr(L, 1); - lua_pop(L, 1); ws->start(); return 0; } @@ -127,7 +124,6 @@ int WebSocket_connect(lua_State* L) int WebSocket_close(lua_State* L) { auto ws = get_ptr(L, 1); - lua_pop(L, 1); ws->stop(); return 0; } @@ -135,7 +131,6 @@ int WebSocket_close(lua_State* L) int WebSocket_get_url(lua_State* L) { auto ws = get_ptr(L, 1); - lua_pop(L, 1); lua_pushstring(L, ws->getUrl().c_str()); return 1; }