diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPDataCellFormatter.h | 9 | ||||
-rw-r--r-- | Source/SPDataCellFormatter.m | 16 | ||||
-rw-r--r-- | Source/SPDatabaseDocument.m | 4 | ||||
-rw-r--r-- | Source/SPStringAdditions.h | 4 | ||||
-rw-r--r-- | Source/SPStringAdditions.m | 46 |
5 files changed, 11 insertions, 68 deletions
diff --git a/Source/SPDataCellFormatter.h b/Source/SPDataCellFormatter.h index 66bf442e..4eef3f7a 100644 --- a/Source/SPDataCellFormatter.h +++ b/Source/SPDataCellFormatter.h @@ -31,12 +31,7 @@ NSString *fieldType; } -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 - @property NSInteger textLimit; - @property NSString* fieldType; -#else - -(NSInteger)textLimit; - -(void)setTextLimit:(NSInteger)limit; -#endif +@property NSInteger textLimit; +@property NSString* fieldType; @end diff --git a/Source/SPDataCellFormatter.m b/Source/SPDataCellFormatter.m index f82bad1e..75fc009c 100644 --- a/Source/SPDataCellFormatter.m +++ b/Source/SPDataCellFormatter.m @@ -29,20 +29,8 @@ @implementation SPDataCellFormatter -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 - @synthesize textLimit; - @synthesize fieldType; -#else - -(NSInteger)textLimit - { - return textLimit; - } - - -(void)setTextLimit:(NSInteger)limit - { - textLimit = limit; - } -#endif +@synthesize textLimit; +@synthesize fieldType; - (NSString *)stringForObjectValue:(id)anObject { diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index ae37cabe..03db2925 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -237,8 +237,7 @@ [taskProgressWindow setAlphaValue:0.0]; [taskProgressWindow setContentView:taskProgressLayer]; - [contentViewSplitter setDelegate:self]; - + [contentViewSplitter setDelegate:self]; } /** @@ -4223,7 +4222,6 @@ */ - (BOOL)parentTabShouldClose { - // If no connection is available, always return YES. Covers initial setup and disconnections. if(!_isConnected) return YES; diff --git a/Source/SPStringAdditions.h b/Source/SPStringAdditions.h index cd82696f..1826f888 100644 --- a/Source/SPStringAdditions.h +++ b/Source/SPStringAdditions.h @@ -72,8 +72,4 @@ static inline id NSMutableAttributedStringAttributeAtIndex (NSMutableAttributedS - (CGFloat)levenshteinDistanceWithWord:(NSString *)stringB; -#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5 - - (NSArray *)componentsSeparatedByCharactersInSet:(NSCharacterSet *)set; -#endif - @end diff --git a/Source/SPStringAdditions.m b/Source/SPStringAdditions.m index fc8326e7..2eafb4e9 100644 --- a/Source/SPStringAdditions.m +++ b/Source/SPStringAdditions.m @@ -282,41 +282,8 @@ return lineRangesArray; } -#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5 -/* - * componentsSeparatedByCharactersInSet: - * Credit - Greg Hulands <ghulands@mac.com> - * Needed for 10.4+ compatibility - */ -- (NSArray *)componentsSeparatedByCharactersInSet:(NSCharacterSet *)set // 10.5 adds this to NSString, but we are 10.4+ -{ - NSMutableArray *result = [NSMutableArray array]; - NSScanner *scanner = [NSScanner scannerWithString:self]; - NSString *chunk = nil; - - [scanner setCharactersToBeSkipped:nil]; - BOOL sepFound = [scanner scanCharactersFromSet:set intoString:(NSString **)nil]; // skip any preceding separators - - if (sepFound) { // if initial separator, start with empty component - [result addObject:@""]; - } - - while ([scanner scanUpToCharactersFromSet:set intoString:&chunk]) { - [result addObject:chunk]; - sepFound = [scanner scanCharactersFromSet: set intoString: (NSString **) nil]; - } - - if (sepFound) { // if final separator, end with empty component - [result addObject: @""]; - } - - result = [result copy]; - return [result autorelease]; -} -#endif - /** - * + * Returns the string by removing the characters in the supplied set and options. */ - (NSString *)stringByRemovingCharactersInSet:(NSCharacterSet *)charSet options:(NSUInteger)mask { @@ -348,7 +315,7 @@ } /** - * + * Convenience method to access the above method with no options. */ - (NSString *)stringByRemovingCharactersInSet:(NSCharacterSet *)charSet { @@ -408,16 +375,15 @@ } /** - * Returns the minimum of a, b and c + * Returns the minimum of a, b and c. */ - (NSInteger)smallestOf:(NSInteger)a andOf:(NSInteger)b andOf:(NSInteger)c { NSInteger min = a; - if ( b < min ) - min = b; + + if (b < min) min = b; - if( c < min ) - min = c; + if (c < min) min = c; return min; } |