diff options
author | rowanbeentje <rowan@beent.je> | 2009-10-05 22:35:23 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-10-05 22:35:23 +0000 |
commit | 29cfd02f7828d92136fce32e0cb888e9dd9fd2ba (patch) | |
tree | 88867365d6ed8b9977d69ebf711172348e307fcb /Frameworks | |
parent | 581e50a3637f5eb017661b2edca4e91f9ba7591b (diff) | |
download | sequelpro-29cfd02f7828d92136fce32e0cb888e9dd9fd2ba.tar.gz sequelpro-29cfd02f7828d92136fce32e0cb888e9dd9fd2ba.tar.bz2 sequelpro-29cfd02f7828d92136fce32e0cb888e9dd9fd2ba.zip |
Tiny tweak: make isNSNull checks ~3x faster
Diffstat (limited to 'Frameworks')
-rw-r--r-- | Frameworks/MCPKit/MCPFoundationKit/MCPNull.m | 4 |
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 |