OS X: Make PluginList comply with the NSFastEnumeration protocol.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@91643 e17a0e51-4ae3-4d35-97c3-1a29b211df97
This commit is contained in:
parent
637f97d9db
commit
5932a2148f
|
@ -369,7 +369,7 @@
|
|||
|
||||
- (NSUInteger)hash
|
||||
{
|
||||
return [path hash];
|
||||
return [fullPlugPath hash];
|
||||
}
|
||||
|
||||
- (NSString *)description
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
#import "PcsxrPlugin.h"
|
||||
|
||||
//extern NSMutableArray *plugins;
|
||||
@class PcsxrPlugin;
|
||||
|
||||
@interface PluginList : NSObject
|
||||
@interface PluginList : NSObject <NSFastEnumeration>
|
||||
|
||||
+ (PluginList *)list;
|
||||
|
||||
|
@ -25,4 +26,7 @@
|
|||
- (void)disableNetPlug;
|
||||
- (void)enableNetPlug;
|
||||
|
||||
- (PcsxrPlugin*)objectAtIndexedSubscript:(NSInteger)index;
|
||||
- (NSInteger)count;
|
||||
|
||||
@end
|
||||
|
|
|
@ -312,7 +312,21 @@ const static int typeList[] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD, P
|
|||
dst++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (NSInteger)count;
|
||||
{
|
||||
return self.pluginList.count;
|
||||
}
|
||||
|
||||
- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(__unsafe_unretained id [])buffer count:(NSUInteger)len
|
||||
{
|
||||
return [self.pluginList countByEnumeratingWithState:state objects:buffer count:len];
|
||||
}
|
||||
|
||||
- (PcsxrPlugin*)objectAtIndexedSubscript:(NSInteger)index
|
||||
{
|
||||
return self.pluginList[index];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue