From dfd188ba12f22db8d31cb80426d568e97345e1e2 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 28 Nov 2017 09:19:07 -0200 Subject: [PATCH] detail (identation of switch) --- ldump.c | 35 +++++++++++++++++------------------ lundump.c | 37 ++++++++++++++++++------------------- 2 files changed, 35 insertions(+), 37 deletions(-) diff --git a/ldump.c b/ldump.c index 16a95f9b..4d3f6435 100644 --- a/ldump.c +++ b/ldump.c @@ -1,5 +1,5 @@ /* -** $Id: ldump.c,v 2.38 2017/06/27 11:35:31 roberto Exp roberto $ +** $Id: ldump.c,v 2.39 2017/06/27 14:21:12 roberto Exp roberto $ ** save precompiled Lua chunks ** See Copyright Notice in lua.h */ @@ -113,23 +113,22 @@ static void DumpConstants (const Proto *f, DumpState *D) { const TValue *o = &f->k[i]; DumpByte(ttype(o), D); switch (ttype(o)) { - case LUA_TNIL: - break; - case LUA_TBOOLEAN: - DumpByte(bvalue(o), D); - break; - case LUA_TNUMFLT: - DumpNumber(fltvalue(o), D); - break; - case LUA_TNUMINT: - DumpInteger(ivalue(o), D); - break; - case LUA_TSHRSTR: - case LUA_TLNGSTR: - DumpString(tsvalue(o), D); - break; - default: - lua_assert(0); + case LUA_TNIL: + break; + case LUA_TBOOLEAN: + DumpByte(bvalue(o), D); + break; + case LUA_TNUMFLT: + DumpNumber(fltvalue(o), D); + break; + case LUA_TNUMINT: + DumpInteger(ivalue(o), D); + break; + case LUA_TSHRSTR: + case LUA_TLNGSTR: + DumpString(tsvalue(o), D); + break; + default: lua_assert(0); } } } diff --git a/lundump.c b/lundump.c index 1f2f1a92..489a1494 100644 --- a/lundump.c +++ b/lundump.c @@ -1,5 +1,5 @@ /* -** $Id: lundump.c,v 2.46 2017/06/27 14:21:12 roberto Exp roberto $ +** $Id: lundump.c,v 2.47 2017/06/29 15:06:44 roberto Exp roberto $ ** load precompiled Lua chunks ** See Copyright Notice in lua.h */ @@ -134,24 +134,23 @@ static void LoadConstants (LoadState *S, Proto *f) { TValue *o = &f->k[i]; int t = LoadByte(S); switch (t) { - case LUA_TNIL: - setnilvalue(o); - break; - case LUA_TBOOLEAN: - setbvalue(o, LoadByte(S)); - break; - case LUA_TNUMFLT: - setfltvalue(o, LoadNumber(S)); - break; - case LUA_TNUMINT: - setivalue(o, LoadInteger(S)); - break; - case LUA_TSHRSTR: - case LUA_TLNGSTR: - setsvalue2n(S->L, o, LoadString(S)); - break; - default: - lua_assert(0); + case LUA_TNIL: + setnilvalue(o); + break; + case LUA_TBOOLEAN: + setbvalue(o, LoadByte(S)); + break; + case LUA_TNUMFLT: + setfltvalue(o, LoadNumber(S)); + break; + case LUA_TNUMINT: + setivalue(o, LoadInteger(S)); + break; + case LUA_TSHRSTR: + case LUA_TLNGSTR: + setsvalue2n(S->L, o, LoadString(S)); + break; + default: lua_assert(0); } } }