开发者

How can I mute warnings for unused parameters in method implementation

开发者 https://www.devze.com 2023-04-02 09:22 出处:网络
Using AppCode 108.1068, developing an iOS app with cocos2d, I often end up implementing methods for a selector, and it goes like this:

Using AppCode 108.1068, developing an iOS app with cocos2d, I often end up implementing methods for a selector, and it goes like this:

-(void) sequenceStateSelectSkillByCPU:(ccTime) dt{
    if (cycleCount_==1) {
        touchHandler_.isEnabled=NO;
        isSequencingSkillsChoice_=YES;
        [self interruptScheduling];
        [self flyOut];
        [master_ taskComplete:@"skillsChoice"];

    }
}

I keep getting the warning about unused variable (dt, i Know, i prefer having full control over my state handling rather than relying on dt). I am implementing a method that complies to a protocol that shoves dt on me, 开发者_如何学Cin all circumstances, whether i need it or not.

Was wondering where/how to mute that specific warning.


Turns out the inspection to check off is 'unused local variables' ... which unfortunately also stops the useful 'unused local variables'for variables declared inside the body of the method.


It is not good practice to hide compiler warnings. But sometimes it's really complicated to find out my warnigs among huge number of warnings from other frameworks or built-in projects. Anyway if any one want to supress those "unused" compliler warnigs then open project's build settings and change the compilation flags.

How can I mute warnings for unused parameters in method implementation

0

精彩评论

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