diff options
author | Johannes Schickel | 2012-09-21 02:18:54 +0200 |
---|---|---|
committer | Johannes Schickel | 2012-09-21 02:35:50 +0200 |
commit | 8aceef971106ba35ab234b165dbe6e19c842f336 (patch) | |
tree | dc1286a31068872960cd3d5925acba78a2b912a7 /engines/pegasus/pegasus.cpp | |
parent | b0079f4fa67099cec2c58e7907bf3fe09d0755cf (diff) | |
download | scummvm-rg350-8aceef971106ba35ab234b165dbe6e19c842f336.tar.gz scummvm-rg350-8aceef971106ba35ab234b165dbe6e19c842f336.tar.bz2 scummvm-rg350-8aceef971106ba35ab234b165dbe6e19c842f336.zip |
PEGASUS: Replace FunctionPtr by our Functor code in Common.
This "fixes" a segmentation fault in our buildbot's toolchain for DC.
The segmentation fault occured while compiling
engines/pegasus/ai/ai_condition.cpp.
Thanks to clone2727 for looking over this and testing it.
Diffstat (limited to 'engines/pegasus/pegasus.cpp')
-rw-r--r-- | engines/pegasus/pegasus.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp index cbe2222c83..dbd9ec2a28 100644 --- a/engines/pegasus/pegasus.cpp +++ b/engines/pegasus/pegasus.cpp @@ -115,10 +115,6 @@ PegasusEngine::~PegasusEngine() { delete _gfx; } -void introTimerExpiredFunction(FunctionPtr *, void *) { - ((PegasusEngine *)g_engine)->introTimerExpired(); -} - Common::Error PegasusEngine::run() { _console = new PegasusConsole(this); _gfx = new GraphicsManager(this); @@ -186,7 +182,7 @@ Common::Error PegasusEngine::run() { if (!isDemo()) { _introTimer = new FuseFunction(); - _introTimer->setFunctionPtr(&introTimerExpiredFunction, 0); + _introTimer->setFunctor(new Common::Functor0Mem<void, PegasusEngine>(this, &PegasusEngine::introTimerExpired)); } while (!shouldQuit()) { |