Skip to content

Commit 48bc290

Browse files
committed
Incorrect block type in CCPhysicsNode.
1 parent 03012d6 commit 48bc290

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

cocos2d/CCPhysicsNode.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ Mass has no particular units. I personally find it intuitive to use 1.0 as the m
242242
* @param radius Radius to sweep.
243243
* @param block Block to execute per result.
244244
*/
245-
-(void)pointQueryAt:(CGPoint)point within:(CGFloat)radius block:(BOOL (^)(CCPhysicsShape *shape, CGPoint nearest, CGFloat distance))block;
245+
-(void)pointQueryAt:(CGPoint)point within:(CGFloat)radius block:(void (^)(CCPhysicsShape *shape, CGPoint nearest, CGFloat distance))block;
246246

247247
/**
248248
* Shoot a ray from 'start' to 'end' and find all of the CCPhysicsShapes that it would hit.
@@ -252,7 +252,7 @@ Mass has no particular units. I personally find it intuitive to use 1.0 as the m
252252
* @param end End point.
253253
* @param block Block to execute per result.
254254
*/
255-
-(void)rayQueryFirstFrom:(CGPoint)start to:(CGPoint)end block:(BOOL (^)(CCPhysicsShape *shape, CGPoint point, CGPoint normal, CGFloat distance))block;
255+
-(void)rayQueryFirstFrom:(CGPoint)start to:(CGPoint)end block:(void (^)(CCPhysicsShape *shape, CGPoint point, CGPoint normal, CGFloat distance))block;
256256

257257
/**
258258
* Find all CCPhysicsShapes whose bounding boxes overlap the given CGRect.
@@ -261,7 +261,7 @@ Mass has no particular units. I personally find it intuitive to use 1.0 as the m
261261
* @param rect Rectangle area to check.
262262
* @param block The block is called once for each shape found.
263263
*/
264-
-(void)rectQuery:(CGRect)rect block:(BOOL (^)(CCPhysicsShape *shape))block;
264+
-(void)rectQuery:(CGRect)rect block:(void (^)(CCPhysicsShape *shape))block;
265265

266266
@end
267267

cocos2d/CCPhysicsNode.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,21 +377,21 @@ -(void)setCollisionDelegate:(NSObject<CCPhysicsCollisionDelegate> *)collisionDel
377377

378378
//MARK: Queries:
379379

380-
-(void)pointQueryAt:(CGPoint)point within:(CGFloat)radius block:(BOOL (^)(CCPhysicsShape *, CGPoint, CGFloat))block
380+
-(void)pointQueryAt:(CGPoint)point within:(CGFloat)radius block:(void (^)(CCPhysicsShape *, CGPoint, CGFloat))block
381381
{
382382
cpSpacePointQuery_b(_space.space, CCP_TO_CPV(point), radius, CP_SHAPE_FILTER_ALL, ^(cpShape *shape, cpVect p, cpFloat d, cpVect g){
383383
block([cpShapeGetUserData(shape) userData], CPV_TO_CCP(p), d);
384384
});
385385
}
386386

387-
-(void)rayQueryFirstFrom:(CGPoint)start to:(CGPoint)end block:(BOOL (^)(CCPhysicsShape *, CGPoint, CGPoint, CGFloat))block
387+
-(void)rayQueryFirstFrom:(CGPoint)start to:(CGPoint)end block:(void (^)(CCPhysicsShape *, CGPoint, CGPoint, CGFloat))block
388388
{
389389
cpSpaceSegmentQuery_b(_space.space, CCP_TO_CPV(start), CCP_TO_CPV(end), 0.0, CP_SHAPE_FILTER_ALL, ^(cpShape *shape, cpVect p, cpVect n, cpFloat t){
390390
block([cpShapeGetUserData(shape) userData], CPV_TO_CCP(p), CPV_TO_CCP(n), t);
391391
});
392392
}
393393

394-
-(void)rectQuery:(CGRect)rect block:(BOOL (^)(CCPhysicsShape *shape))block
394+
-(void)rectQuery:(CGRect)rect block:(void (^)(CCPhysicsShape *shape))block
395395
{
396396
cpBB bb = cpBBNew(
397397
CGRectGetMinX(rect),

0 commit comments

Comments
 (0)