Skip to content

Instantly share code, notes, and snippets.

@mteece
Created December 9, 2012 22:55
Show Gist options
  • Select an option

  • Save mteece/4247358 to your computer and use it in GitHub Desktop.

Select an option

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
// 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
});
@robb
Copy link
Copy Markdown

robb commented Dec 31, 2012

You can now use _.arrayEach(serviceRequests, ^(id obj) {…}) introduced in v0.2.0 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment