- lua_hourglass: formatting code using astyle

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2021-11-20 18:53:31 +01:00
committed by Thilo Graf
parent e52eb3d144
commit 597a6e3854
2 changed files with 27 additions and 22 deletions

View File

@@ -41,7 +41,8 @@ CLuaInstHourGlass* CLuaInstHourGlass::getInstance()
void CLuaInstHourGlass::HourGlassRegister(lua_State *L)
{
luaL_Reg meth[] = {
luaL_Reg meth[] =
{
{ "new", CLuaInstHourGlass::HourGlassNew },
{ "paint", CLuaInstHourGlass::HourGlassPaint },
{ "hide", CLuaInstHourGlass::HourGlassHide },
@@ -106,10 +107,12 @@ int CLuaInstHourGlass::HourGlassPaint(lua_State *L)
{
lua_assert(lua_istable(L, 1));
CLuaHourGlass *D = HourGlassCheck(L, 1);
if (!D) return 0;
if (!D)
return 0;
bool do_save_bg = true;
if (!tableLookup(L, "do_save_bg", do_save_bg)) {
if (!tableLookup(L, "do_save_bg", do_save_bg))
{
std::string tmp = "true";
if (tableLookup(L, "do_save_bg", tmp))
paramBoolDeprecated(L, tmp.c_str());
@@ -123,7 +126,8 @@ int CLuaInstHourGlass::HourGlassHide(lua_State *L)
{
lua_assert(lua_istable(L, 1));
CLuaHourGlass *D = HourGlassCheck(L, 1);
if (!D) return 0;
if (!D)
return 0;
bool tmp1 = false;
std::string tmp2 = "false";
@@ -138,7 +142,8 @@ int CLuaInstHourGlass::HourGlassDelete(lua_State *L)
{
LUA_DEBUG("CLuaInstHourGlass::%s %d\n", __func__, lua_gettop(L));
CLuaHourGlass *D = HourGlassCheck(L, 1);
if (!D) return 0;
if (!D)
return 0;
D->h->kill();
delete D;
return 0;