From 8aceef971106ba35ab234b165dbe6e19c842f336 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 21 Sep 2012 02:18:54 +0200 Subject: 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. --- engines/pegasus/pegasus.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'engines/pegasus/pegasus.cpp') 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(this, &PegasusEngine::introTimerExpired)); } while (!shouldQuit()) { -- cgit v1.2.3