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/neighborhood/neighborhood.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/neighborhood/neighborhood.cpp')
-rw-r--r-- | engines/pegasus/neighborhood/neighborhood.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/pegasus/neighborhood/neighborhood.cpp b/engines/pegasus/neighborhood/neighborhood.cpp index bb2c6486cc..ae383a661b 100644 --- a/engines/pegasus/neighborhood/neighborhood.cpp +++ b/engines/pegasus/neighborhood/neighborhood.cpp @@ -1740,15 +1740,15 @@ void Neighborhood::useIdleTime() { } } -void timerFunction(FunctionPtr *, void *neighborhood) { - ((Neighborhood *)neighborhood)->timerExpired(((Neighborhood *)neighborhood)->getTimerEvent()); +void Neighborhood::timerFunction() { + timerExpired(getTimerEvent()); } void Neighborhood::scheduleEvent(const TimeValue time, const TimeScale scale, const uint32 eventType) { _eventTimer.stopFuse(); _eventTimer.primeFuse(time, scale); _timerEvent = eventType; - _eventTimer.setFunctionPtr(&timerFunction, this); + _eventTimer.setFunctor(new Common::Functor0Mem<void, Neighborhood>(this, &Neighborhood::timerFunction)); _eventTimer.lightFuse(); } |