diff options
author | rowanbeentje <rowan@beent.je> | 2009-11-04 01:15:53 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-11-04 01:15:53 +0000 |
commit | 48d02b7080cadc507b1e7897c54ce2a8cf149acf (patch) | |
tree | f45eba9b97c71e1579580d790e9c9aa00088b26a /Source/SPArrayAdditions.h | |
parent | 0d5acfadf8d43ab3889f50456f5dc7ff42bf1a12 (diff) | |
download | sequelpro-48d02b7080cadc507b1e7897c54ce2a8cf149acf.tar.gz sequelpro-48d02b7080cadc507b1e7897c54ce2a8cf149acf.tar.bz2 sequelpro-48d02b7080cadc507b1e7897c54ce2a8cf149acf.zip |
- Add task support to all the main interface views
- Improve task support on previously supported views
- Use a threaded task load for all initial table loads
- Support threaded task loads for table content loads, reloads, sorts, and filters
- Improve upon previous threaded task loads by minimising view updates and supporting updates of the existing data arrays where valid
Diffstat (limited to 'Source/SPArrayAdditions.h')
-rw-r--r-- | Source/SPArrayAdditions.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/SPArrayAdditions.h b/Source/SPArrayAdditions.h index 31493f22..eb11da02 100644 --- a/Source/SPArrayAdditions.h +++ b/Source/SPArrayAdditions.h @@ -27,12 +27,11 @@ static inline id NSArrayObjectAtIndex(NSArray* self, NSUInteger i) { return (id)CFArrayGetValueAtIndex((CFArrayRef)self, i); } - static inline void NSMutableArrayAddObject(NSArray* self, id anObject) { - typedef void (*SPMutableArrayAddObjectMethodPtr)(NSArray*, SEL, id); - static SPMutableArrayAddObjectMethodPtr SPNSMutableArrayAddObject; - if (!SPNSMutableArrayAddObject) SPNSMutableArrayAddObject = (SPMutableArrayAddObjectMethodPtr)[self methodForSelector:@selector(addObject:)]; - SPNSMutableArrayAddObject(self, @selector(addObject:), anObject); + CFArrayAppendValue((CFMutableArrayRef)self, anObject); +} +static inline void NSMutableArrayReplaceObject(NSArray* self, CFIndex idx, id anObject) { + CFArraySetValueAtIndex((CFMutableArrayRef)self, idx, anObject); } @interface NSArray (SPArrayAdditions) |