aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/MCPKit/MCPFoundationKit
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-10-05 22:35:23 +0000
committerrowanbeentje <rowan@beent.je>2009-10-05 22:35:23 +0000
commit29cfd02f7828d92136fce32e0cb888e9dd9fd2ba (patch)
tree88867365d6ed8b9977d69ebf711172348e307fcb /Frameworks/MCPKit/MCPFoundationKit
parent581e50a3637f5eb017661b2edca4e91f9ba7591b (diff)
downloadsequelpro-29cfd02f7828d92136fce32e0cb888e9dd9fd2ba.tar.gz
sequelpro-29cfd02f7828d92136fce32e0cb888e9dd9fd2ba.tar.bz2
sequelpro-29cfd02f7828d92136fce32e0cb888e9dd9fd2ba.zip
Tiny tweak: make isNSNull checks ~3x faster
Diffstat (limited to 'Frameworks/MCPKit/MCPFoundationKit')
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPNull.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPNull.m b/Frameworks/MCPKit/MCPFoundationKit/MCPNull.m
index 5d3f4523..76d9cfb1 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPNull.m
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPNull.m
@@ -35,7 +35,9 @@
*/
- (BOOL) isNSNull
{
- return [self isMemberOfClass:[NSNull class]];
+ static id NSNullForComparison;
+ if (!NSNullForComparison) NSNullForComparison = [NSNull null];;
+ return (self == NSNullForComparison);
}
@end