Archived
1

Cleaned Code

This commit is contained in:
Kim Wittenburg
2014-10-21 15:06:57 +02:00
parent 5592128926
commit 91e7dbe9f2
20 changed files with 126 additions and 92 deletions

View File

@@ -84,7 +84,7 @@
if (index >= _cache.count) {
return NO;
}
return _cache[index] != MPNull;
return _cache[index] != [NSNull null];
}
- (id)cachableObjectForIndex:(NSUInteger)index
@@ -102,7 +102,7 @@
- (void)ensureCacheSizeForIndex:(NSUInteger)index
{
while (index >= _cache.count) {
[_cache addObject:MPNull];
[_cache addObject:[NSNull null]];
}
}
@@ -112,7 +112,7 @@
{
NSMutableArray *placeholders = [[NSMutableArray alloc] initWithCapacity:replacementLength];
while (placeholders.count < replacementLength) {
[placeholders addObject:MPNull];
[placeholders addObject:[NSNull null]];
}
[_cache replaceObjectsInRange:range
withObjectsFromArray:placeholders];
@@ -141,6 +141,12 @@
usingFont:self.font];
}
- (CTLineRef)createLineForString:(NSString *)aString emphasize:(BOOL)emphasize
{
return [self createLineForString:aString
usingFont:[NSFont systemFontOfSize:[NSFont systemFontSize]]];
}
- (CTLineRef)createLineForString:(NSString *)aString
usingFont:(NSFont *)font
{