views:

51

answers:

1

I keep getting this warning warning: passing argument 1 of 'CGPathMoveToPoint' discards qualifiers from pointer target type

I am calling the function like this

const CGAffineTransform m = CGAffineTransformIdentity;
CGPathMoveToPoint(path, &m , nextPos.x, nextPos.y);

I already tried

CGPathMoveToPoint(path, NULL , nextPos.x, nextPos.y);

or

CGAffineTransform m = CGAffineTransformIdentity;
CGPathMoveToPoint(path, &m , nextPos.x, nextPos.y);

But i always get this error, how do i get rid of it?

+4  A: 

The warning is about argument 1, but all your variations are on argument 2. Try changing argument 1, path — probably to get rid of a rogue const — and that should fix it.

Chuck
Lol, thanks, that was kinda ridiculous. Yeah i started a CGPathRef and it should be CGMutablePathRef. Thanks a bunch, i was crawling the web for a while :P
Joao Lopes

related questions