diff options
author | pixel <pixel> | 2007-05-25 15:36:40 +0000 |
---|---|---|
committer | pixel <pixel> | 2007-05-25 15:36:40 +0000 |
commit | e2c6c7ded94dca3ef007e57a989a223bab205649 (patch) | |
tree | 793a6802af314165e7295d89e219932985795167 | |
parent | 8df34dbaea02a0c473229b46417e62d92d363a40 (diff) |
De-dumbifying the code a bit.
-rw-r--r-- | lib/LuaTask.cc | 38 |
1 files 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); |