Created
December 9, 2012 22:55
-
-
Save mteece/4247358 to your computer and use it in GitHub Desktop.
Using *__unused* to tell LLVM to ignore unused variable in XCode 4.3.2, example with Underscore.m
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Uses http://underscorem.org/ | |
| // #import "USArrayWrapper.h" | |
| // Wraps an array in Underscore.m's USArrayWrapper. This is crucial in order to use the | |
| // other methods. The *__unused* tells LLVM to ignore unused variable in XCode 4.3.2. | |
| USArrayWrapper *wrapper __unused = _array(serviceRequests); | |
| _array(serviceRequests).each(^(id obj) { | |
| RequestModel *req = (RequestModel *)obj; | |
| NSLog(@"Object: %@", req | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can now use
_.arrayEach(serviceRequests, ^(id obj) {…})introduced in v0.2.0 :-)