aboutsummaryrefslogtreecommitdiff
path: root/engines/pegasus/neighborhood/neighborhood.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2012-09-21 02:18:54 +0200
committerJohannes Schickel2012-09-21 02:35:50 +0200
commit8aceef971106ba35ab234b165dbe6e19c842f336 (patch)
treedc1286a31068872960cd3d5925acba78a2b912a7 /engines/pegasus/neighborhood/neighborhood.cpp
parentb0079f4fa67099cec2c58e7907bf3fe09d0755cf (diff)
downloadscummvm-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.cpp6
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();
}