开发者

iPhone - Three220 - TTScrollView : Dead store analyzed result

I've just moved my project to XCode 4 from Xcode 3 and see this Dead Store in TTScrollView class:

- (CGFloat)tween:(NSTimeInterval)t b:(NSTimeInterval)b c:(NSTi开发者_如何学JAVAmeInterval)c d:(NSTimeInterval)d 
{  
      return c*((t=t/d-1)*t*t + 1) + b;  
}

The warning is:

"Although the value stored to 't' is used in the enclosing expression, the value is never actually read from 't'"

How do I fix this?


Look closely at

c*((t=t/d-1)*t*t + 1) + b;  

You are redefining t! I don't think this is what you mean to be doing here. Perhaps ==? Or perhaps you just mean c*((t/d-1)*t*t + 1) + b;?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜