Hello everyone. After I updated my Xcode from 5.0.1 to 5.1, an issue never occurred before, just showed up.
usually after creating a new project, with create-project.py, a new Hello World project will be generated, no compiling or linking error.
But the following problems occurred after I updated my Xcode to 5.1.
Semantic Issue: Cast from pointer to smaller type ‘int’ loses information
// Pass the touches to the superview
pragma mark EAGLView - Touch Delegate
-
(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
if (isKeyboardShown_)
{
[self handleTouchesAfterKeyboardShow];
return;
}int ids[IOS_MAX_TOUCHES_COUNT] = {0};
float xs[IOS_MAX_TOUCHES_COUNT] = {0.0f};
float ys[IOS_MAX_TOUCHES_COUNT] = {0.0f};int i = 0;
for (UITouch *touch in touches) {
ids[i] = (int)touch;
xs[i] = [touch locationInView: [touch view]].x * view.contentScaleFactor;;
ys[i] = [touch locationInView: [touch view]].y * view.contentScaleFactor;;
++i;
}
cocos2d::CCEGLView::sharedOpenGLView()->handleTouchesBegin(i, ids, xs, ys);
}
Someone please tell me how to fix this issue, Thank you!!!
屏幕快照 2014-03-18 下午1.56.00.png (32.6 KB)
屏幕快照 2014-03-18 下午1.56.03.png (110.2 KB)