aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPStringAdditions.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/SPStringAdditions.h
parent10990abb16783d89e5314549883fc1e5acc2e407 (diff)
downloadsequelpro-b2461e0658f6deebf2b4a24e261fadb99f5125c6.tar.gz
sequelpro-b2461e0658f6deebf2b4a24e261fadb99f5125c6.tar.bz2
sequelpro-b2461e0658f6deebf2b4a24e261fadb99f5125c6.zip
Tidy up.
Diffstat (limited to 'Source/SPStringAdditions.h')
-rw-r--r--Source/SPStringAdditions.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/SPStringAdditions.h b/Source/SPStringAdditions.h
index fd30a50b..a0b39504 100644
--- a/Source/SPStringAdditions.h
+++ b/Source/SPStringAdditions.h
@@ -23,14 +23,13 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
/*
* NSStringUTF8String(@"a String") function can be used to speed up
* the convertion from a NSString to NSData or const char* resp.
* NSData *d = [aStr UTF8String]; :== NSData *d = NSStringUTF8String(aStr);
*/
-static inline const char* NSStringUTF8String(NSString* self) {
+static inline const char* NSStringUTF8String(NSString* self)
+{
typedef const char* (*SPUTF8StringMethodPtr)(NSString*, SEL);
static SPUTF8StringMethodPtr SPNSStringGetUTF8String;
if (!SPNSStringGetUTF8String) SPNSStringGetUTF8String = (SPUTF8StringMethodPtr)[NSString instanceMethodForSelector:@selector(UTF8String)];
@@ -38,7 +37,8 @@ static inline const char* NSStringUTF8String(NSString* self) {
return to_return;
}
-static inline void NSMutableAttributedStringAddAttributeValueRange (NSMutableAttributedString* self, NSString* aStr, id aValue, NSRange aRange) {
+static inline void NSMutableAttributedStringAddAttributeValueRange (NSMutableAttributedString* self, NSString* aStr, id aValue, NSRange aRange)
+{
typedef void (*SPMutableAttributedStringAddAttributeValueRangeMethodPtr)(NSMutableAttributedString*, SEL, NSString*, id, NSRange);
static SPMutableAttributedStringAddAttributeValueRangeMethodPtr SPMutableAttributedStringAddAttributeValueRange;
if (!SPMutableAttributedStringAddAttributeValueRange) SPMutableAttributedStringAddAttributeValueRange = (SPMutableAttributedStringAddAttributeValueRangeMethodPtr)[self methodForSelector:@selector(addAttribute:value:range:)];
@@ -46,7 +46,8 @@ static inline void NSMutableAttributedStringAddAttributeValueRange (NSMutableAtt
return;
}
-static inline id NSMutableAttributedStringAttributeAtIndex (NSMutableAttributedString* self, NSString* aStr, NSUInteger index, NSRangePointer range) {
+static inline id NSMutableAttributedStringAttributeAtIndex (NSMutableAttributedString* self, NSString* aStr, NSUInteger index, NSRangePointer range)
+{
typedef id (*SPMutableAttributedStringAttributeAtIndexMethodPtr)(NSMutableAttributedString*, SEL, NSString*, NSUInteger, NSRangePointer);
static SPMutableAttributedStringAttributeAtIndexMethodPtr SPMutableAttributedStringAttributeAtIndex;
if (!SPMutableAttributedStringAttributeAtIndex) SPMutableAttributedStringAttributeAtIndex = (SPMutableAttributedStringAttributeAtIndexMethodPtr)[self methodForSelector:@selector(attribute:atIndex:effectiveRange:)];