diff options
| author | Nay <dnpd.dd@gmail.com> | 2013-07-28 16:59:07 +0100 |
|---|---|---|
| committer | Nay <dnpd.dd@gmail.com> | 2013-07-28 16:59:07 +0100 |
| commit | f71d894a215ed7cd9052913c9b07c8f62f0e99ca (patch) | |
| tree | d1253ba869f0195c23d05630cbd7315dd07e1421 /src/server/worldserver/CommandLine | |
| parent | 62918e92d0493978e16f5fb1365818e9efa8461b (diff) | |
Servers: Fix some code style issues in world and authserver
Diffstat (limited to 'src/server/worldserver/CommandLine')
| -rw-r--r-- | src/server/worldserver/CommandLine/CliRunnable.cpp | 17 | ||||
| -rw-r--r-- | src/server/worldserver/CommandLine/CliRunnable.h | 4 |
2 files changed, 11 insertions, 10 deletions
diff --git a/src/server/worldserver/CommandLine/CliRunnable.cpp b/src/server/worldserver/CommandLine/CliRunnable.cpp index 361af453712..e136269e2a0 100644 --- a/src/server/worldserver/CommandLine/CliRunnable.cpp +++ b/src/server/worldserver/CommandLine/CliRunnable.cpp @@ -39,7 +39,7 @@ #include <readline/readline.h> #include <readline/history.h> -char * command_finder(const char* text, int state) +char* command_finder(const char* text, int state) { static int idx, len; const char* ret; @@ -70,19 +70,18 @@ char * command_finder(const char* text, int state) return ((char*)NULL); } -char ** cli_completion(const char * text, int start, int /*end*/) +char** cli_completion(const char* text, int start, int /*end*/) { - char ** matches; - matches = (char**)NULL; + char** matches = NULL; - if (start == 0) - matches = rl_completion_matches((char*)text, &command_finder); - else + if (start) rl_bind_key('\t', rl_abort); - return (matches); + else + matches = rl_completion_matches((char*)text, &command_finder); + return matches; } -int cli_hook_func(void) +int cli_hook_func() { if (World::IsStopped()) rl_done = 1; diff --git a/src/server/worldserver/CommandLine/CliRunnable.h b/src/server/worldserver/CommandLine/CliRunnable.h index bd14413ef2e..6e608f60881 100644 --- a/src/server/worldserver/CommandLine/CliRunnable.h +++ b/src/server/worldserver/CommandLine/CliRunnable.h @@ -27,7 +27,9 @@ class CliRunnable : public ACE_Based::Runnable { public: - void run(); + void run() OVERRIDE; }; + #endif + /// @} |
