// // NSSet+NGAAdditions.m // MarkdownPreview // // Created by Michael Bishop on 11/3/11. // Copyright (c) 2011 Numerical Garden LLC. All rights reserved. // #import "NSSet+NGAAdditions.h" #import "NGAUtilities.h" @implementation NSSet (NGAAdditions) -(id)setByRemovingObjects:(NSSet*)excludedObjects { if ( excludedObjects == nil || [excludedObjects count] == 0 ) return AUTORELEASE( RETAIN(self) ); NSMutableSet * survivingObjects = [NSMutableSet setWithCapacity:[self count]]; for (id item in self) { if ( ![excludedObjects containsObject:item] ) [survivingObjects addObject:item]; } return [NSSet setWithSet:survivingObjects]; } -(id)setByRemovingObject:(id)excludedObject { if ( excludedObject == nil ) return AUTORELEASE( RETAIN(self) ); return [self setByRemovingObjects:[NSSet setWithObject:excludedObject]]; } @end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 20722 | jdputsch | initial branch, prep for -Zapp= support | ||
//guest/michael_bishop/MacMenu/src/NGAUtilities/Source/NSSet+NGAAdditions.m | |||||
#1 | 8331 | Matt Attaway |
Adding initial version of MacMenu for Perforce MacMenu is a helpful Perforce client that sits in your toolbar. It allows you to run standard Perforce operations on the document that is open the currently active editor/viewer. |