summaryrefslogtreecommitdiff
path: root/src/console.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-06-26 15:12:51 +0000
committeralberth <alberth@openttd.org>2010-06-26 15:12:51 +0000
commitef17c6042f2a78414dea5853cfccf99256ddbbb5 (patch)
tree65dd0e6b23c55b6643da1ae9b2c995a96af0e048 /src/console.cpp
parent5fb3e557d44dbde470dfb1a9643596a8f828c9fe (diff)
downloadopenttd-ef17c6042f2a78414dea5853cfccf99256ddbbb5.tar.xz
(svn r20021) -Codechange: Move variable declarations.
Diffstat (limited to 'src/console.cpp')
-rw-r--r--src/console.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/console.cpp b/src/console.cpp
index ff8b68046..9aa43f4dd 100644
--- a/src/console.cpp
+++ b/src/console.cpp
@@ -386,9 +386,6 @@ static void IConsoleAliasExec(const IConsoleAlias *alias, byte tokencount, char
*/
void IConsoleCmdExec(const char *cmdstr)
{
- IConsoleCmd *cmd = NULL;
- IConsoleAlias *alias = NULL;
-
const char *cmdptr;
char *tokens[ICON_TOKEN_COUNT], tokenstream[ICON_MAX_STREAMSIZE];
uint t_index, tstream_i;
@@ -463,7 +460,7 @@ void IConsoleCmdExec(const char *cmdstr)
* First try commands, then aliases. Execute
* the found action taking into account its hooking code
*/
- cmd = IConsoleCmdGet(tokens[0]);
+ IConsoleCmd *cmd = IConsoleCmdGet(tokens[0]);
if (cmd != NULL) {
ConsoleHookResult chr = (cmd->hook == NULL ? CHR_ALLOW : cmd->hook(true));
switch (chr) {
@@ -479,7 +476,7 @@ void IConsoleCmdExec(const char *cmdstr)
}
t_index--;
- alias = IConsoleAliasGet(tokens[0]);
+ IConsoleAlias *alias = IConsoleAliasGet(tokens[0]);
if (alias != NULL) {
IConsoleAliasExec(alias, t_index, &tokens[1]);
return;