From e2c6c7ded94dca3ef007e57a989a223bab205649 Mon Sep 17 00:00:00 2001 From: pixel Date: Fri, 25 May 2007 15:36:40 +0000 Subject: De-dumbifying the code a bit. --- lib/LuaTask.cc | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/lib/LuaTask.cc b/lib/LuaTask.cc index a0fe0c3..2990e53 100644 --- a/lib/LuaTask.cc +++ b/lib/LuaTask.cc @@ -49,35 +49,33 @@ int LuaTask::Do() throw (GeneralException) { } else { L->resume(nargs); } - case 1: case 2: - if (current == 2) { - int nargs = 0; + int nargs = 0; #ifndef LUATASK_OMIT_HTTPCLIENT - if (task == "HttpClient") { - LuaBuffer o(b); - o.pushdestruct(L); - nargs = 1; - } + if (task == "HttpClient") { + LuaBuffer o(b); + o.pushdestruct(L); + nargs = 1; + } #endif #ifndef LUATASK_OMIT_COMMAND - if (task == "Command") { - delete p; - printm(M_INFO, "Got there (end of command - should)\n"); - LuaBuffer o(b); - o.pushdestruct(L); - nargs = 1; - } + if (task == "Command") { + delete p; + printm(M_INFO, "Got there (end of command - should)\n"); + LuaBuffer o(b); + o.pushdestruct(L); + nargs = 1; + } #endif - if (!c) - delete c; - c = 0; + if (!c) + delete c; + c = 0; - L->resume(nargs); - } + L->resume(nargs); + case 1: current = 2; if (L->gettop() >= 1) { task = L->tostring(1); -- cgit v1.2.3