I have the following in my program (which seems to be working perfectly), but causes a compiler warning:
Passing argument 7 of cpSpaceAddCollisionHandler from incompatible pointer type.
cpSpaceAddCollisionHandler(space, COLLISION_TYPE_BALL, COLLISION_TYPE_LEFT_WALL, collisionBallWallBegin, nil, nil, collisionBallWallEnd, self);
collisionBallWallBegin
does not cause this warning and the two methods are declared the same:
static int collisionBallWallBegin (cpArbiter *arb, cpSpace *space, void *data)
and
static int collisionBallWallEnd(cpArbiter *arb, cpSpace *space, void *data)
I can't figure out why I am getting the warning and it is driving me nuts!
begin
needs to be acpCollisionBeginFunc
, which takes three arguments and returns acpBool
.In comparison,
separate
needs to be acpCollisionSeparateFunc
, which takes three arguments and does not return a value.