Skip to content

Commit d296257

Browse files
committed
Merge pull request #61 from jszumski/master
Made the requirement of a non-nil formatName more explicit.
2 parents b1c5f8d + 1ec0312 commit d296257

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

FastImageCache/FICImageCache.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ typedef void (^FICImageRequestCompletionBlock)(UIImage *sourceImage);
148148
149149
@param entity The entity that uniquely identifies the source image.
150150
151-
@param formatName The format name that uniquely identifies which image table to look in for the cached image.
151+
@param formatName The format name that uniquely identifies which image table to look in for the cached image. Must not be nil.
152152
153153
@param completionBlock The completion block that is called when the requested image is available or if an error occurs.
154154
@@ -175,7 +175,7 @@ typedef void (^FICImageRequestCompletionBlock)(UIImage *sourceImage);
175175
176176
@param entity The entity that uniquely identifies the source image.
177177
178-
@param formatName The format name that uniquely identifies which image table to look in for the cached image.
178+
@param formatName The format name that uniquely identifies which image table to look in for the cached image. Must not be nil.
179179
180180
@param completionBlock The completion block that is called when the requested image is available or if an error occurs.
181181

FastImageCache/FICImageCache.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ - (BOOL)asynchronouslyRetrieveImageForEntity:(id <FICEntity>)entity withFormatNa
162162
}
163163

164164
- (BOOL)_retrieveImageForEntity:(id <FICEntity>)entity withFormatName:(NSString *)formatName loadSynchronously:(BOOL)loadSynchronously completionBlock:(FICImageCacheCompletionBlock)completionBlock {
165+
NSParameterAssert(formatName);
166+
165167
BOOL imageExists = NO;
166168

167169
FICImageTable *imageTable = [_imageTables objectForKey:formatName];

0 commit comments

Comments
 (0)