[colobot] 14/74: Fix calling multi-level inherited methods

Didier Raboud odyx at moszumanska.debian.org
Mon Nov 7 07:50:00 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 860cdb0aea22bb797ea4718765c3056f05df83ed
Author: melex750 <melex750 at users.noreply.github.com>
Date:   Wed Aug 3 19:13:21 2016 -0400

    Fix calling multi-level inherited methods
---
 src/CBot/CBotClass.cpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/CBot/CBotClass.cpp b/src/CBot/CBotClass.cpp
index 17e1651..98a0a6f 100644
--- a/src/CBot/CBotClass.cpp
+++ b/src/CBot/CBotClass.cpp
@@ -333,7 +333,7 @@ CBotTypResult CBotClass::CompileMethode(const std::string& name,
 
     r = m_pMethod->CompileCall(name, ppParams, nIdent);
     if ( r.Eq(CBotErrUndefCall) && m_parent != nullptr )
-        return m_parent->m_pMethod->CompileCall(name, ppParams, nIdent);
+        return m_parent->CompileMethode(name, pThis, ppParams, pStack, nIdent);
     return r;
 }
 
@@ -354,9 +354,7 @@ bool CBotClass::ExecuteMethode(long& nIdent,
 
     if (m_parent != nullptr)
     {
-        ret = m_parent->m_pCalls->DoCall(name, pThis, ppParams, pResult, pStack, pToken);
-        if (ret >= 0) return ret;
-        ret = m_parent->m_pMethod->DoCall(nIdent, name, pThis, ppParams, pStack, pToken, m_parent);
+        ret = m_parent->ExecuteMethode(nIdent, name, pThis, ppParams, pResult, pStack, pToken);
     }
     return ret;
 }

-- 
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