aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDataStorage.h
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-10-19 23:37:15 +0000
committerstuconnolly <stuart02@gmail.com>2010-10-19 23:37:15 +0000
commitb2461e0658f6deebf2b4a24e261fadb99f5125c6 (patch)
treefea57ce1afb8986d4b20c2abfd27ebd4b6ca36d5 /Source/SPDataStorage.h
parent10990abb16783d89e5314549883fc1e5acc2e407 (diff)
downloadsequelpro-b2461e0658f6deebf2b4a24e261fadb99f5125c6.tar.gz
sequelpro-b2461e0658f6deebf2b4a24e261fadb99f5125c6.tar.bz2
sequelpro-b2461e0658f6deebf2b4a24e261fadb99f5125c6.zip
Tidy up.
Diffstat (limited to 'Source/SPDataStorage.h')
-rw-r--r--Source/SPDataStorage.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/SPDataStorage.h b/Source/SPDataStorage.h
index 2baa8d03..6e5f455e 100644
--- a/Source/SPDataStorage.h
+++ b/Source/SPDataStorage.h
@@ -72,28 +72,32 @@
#pragma mark -
#pragma mark Cached method calls to remove obj-c messaging overhead in tight loops
-static inline void SPDataStorageAddRow(SPDataStorage* self, NSArray* row) {
+static inline void SPDataStorageAddRow(SPDataStorage* self, NSArray* row)
+{
typedef void (*SPDSAddRowMethodPtr)(SPDataStorage*, SEL, NSArray*);
static SPDSAddRowMethodPtr SPDSAddRow;
if (!SPDSAddRow) SPDSAddRow = (SPDSAddRowMethodPtr)[self methodForSelector:@selector(addRowWithContents:)];
SPDSAddRow(self, @selector(addRowWithContents:), row);
}
-static inline void SPDataStorageReplaceRow(SPDataStorage* self, NSUInteger rowIndex, NSArray* row) {
+static inline void SPDataStorageReplaceRow(SPDataStorage* self, NSUInteger rowIndex, NSArray* row)
+{
typedef void (*SPDSReplaceRowMethodPtr)(SPDataStorage*, SEL, NSUInteger, NSArray*);
static SPDSReplaceRowMethodPtr SPDSReplaceRow;
if (!SPDSReplaceRow) SPDSReplaceRow = (SPDSReplaceRowMethodPtr)[self methodForSelector:@selector(replaceRowAtIndex:withRowContents:)];
SPDSReplaceRow(self, @selector(replaceRowAtIndex:withRowContents:), rowIndex, row);
}
-static inline void SPDataStorageReplaceObjectAtRowAndColumn(SPDataStorage* self, NSUInteger rowIndex, NSUInteger colIndex, id newObject) {
+static inline void SPDataStorageReplaceObjectAtRowAndColumn(SPDataStorage* self, NSUInteger rowIndex, NSUInteger colIndex, id newObject)
+{
typedef void (*SPDSObjectReplaceMethodPtr)(SPDataStorage*, SEL, NSUInteger, NSUInteger, id);
static SPDSObjectReplaceMethodPtr SPDSObjectReplace;
if (!SPDSObjectReplace) SPDSObjectReplace = (SPDSObjectReplaceMethodPtr)[self methodForSelector:@selector(replaceObjectInRow:column:withObject:)];
SPDSObjectReplace(self, @selector(replaceObjectInRow:column:withObject:), rowIndex, colIndex, newObject);
}
-static inline id SPDataStorageObjectAtRowAndColumn(SPDataStorage* self, NSUInteger rowIndex, NSUInteger colIndex) {
+static inline id SPDataStorageObjectAtRowAndColumn(SPDataStorage* self, NSUInteger rowIndex, NSUInteger colIndex)
+{
typedef id (*SPDSObjectFetchMethodPtr)(SPDataStorage*, SEL, NSUInteger, NSUInteger);
static SPDSObjectFetchMethodPtr SPDSObjectFetch;
if (!SPDSObjectFetch) SPDSObjectFetch = (SPDSObjectFetchMethodPtr)[self methodForSelector:@selector(cellDataAtRow:column:)];