[colobot] 210/377: Fixed commandline interpreter

Didier Raboud odyx at moszumanska.debian.org
Wed Mar 30 13:34:17 UTC 2016


This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit ef91fb8e9d223f945e40b637c7fff0b279446717
Author: krzys-h <krzys_h at interia.pl>
Date:   Sat Dec 26 14:37:36 2015 +0100

    Fixed commandline interpreter
---
 src/CBot/CBotStack.cpp     | 10 +++++-----
 test/cbot/console/main.cpp |  2 ++
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/CBot/CBotStack.cpp b/src/CBot/CBotStack.cpp
index 83babb8..dd544d7 100644
--- a/src/CBot/CBotStack.cpp
+++ b/src/CBot/CBotStack.cpp
@@ -559,24 +559,24 @@ void CBotStack::SetUserPtr(void* user)
 ////////////////////////////////////////////////////////////////////////////////
 bool CBotStack::ExecuteCall(long& nIdent, CBotToken* token, CBotVar** ppVar, const CBotTypResult& rettype)
 {
-    CBotTypResult        res;
+    int res;
 
     // first looks by the identifier
 
     res = m_prog->GetExternalCalls()->DoCall(nullptr, nullptr, ppVar, this, rettype);
-    if (res.GetType() >= 0) return res.GetType();
+    if (res >= 0) return res;
 
     res = m_prog->GetFunctions()->DoCall(nIdent, "", ppVar, this, token );
-    if (res.GetType() >= 0) return res.GetType();
+    if (res >= 0) return res;
 
     // if not found (recompile?) seeks by name
 
     nIdent = 0;
     res = m_prog->GetExternalCalls()->DoCall(token, nullptr, ppVar, this, rettype);
-    if (res.GetType() >= 0) return res.GetType();
+    if (res >= 0) return res;
 
     res = m_prog->GetFunctions()->DoCall(nIdent, token->GetString(), ppVar, this, token );
-    if (res.GetType() >= 0) return res.GetType();
+    if (res >= 0) return res;
 
     SetError(CBotErrUndefFunc, token);
     return true;
diff --git a/test/cbot/console/main.cpp b/test/cbot/console/main.cpp
index b5e24b4..e6b1a4e 100644
--- a/test/cbot/console/main.cpp
+++ b/test/cbot/console/main.cpp
@@ -5,6 +5,8 @@
 
 #include "CBot/CBot.h"
 
+using namespace CBot;
+
 CBotTypResult cMessage(CBotVar* &var, void* user)
 {
     if ( var == nullptr )  return CBotTypResult(CBotErrLowParam);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git



More information about the Pkg-games-commits mailing list