Add nullability annotations to MP42Image.

This commit is contained in:
Damiano Galassi committed 2019-03-11 16:09:17 +01:00
1 parent 0c14b18efc
commit 6255d43870
2 files changed
+8 -4

No files matched your search

+7 -3
View File
@@ -8,6 +8,8 @@
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class NSImage;
typedef enum MP42TagArtworkType_e {
@@ -25,9 +27,11 @@ typedef enum MP42TagArtworkType_e {
- (instancetype)initWithData:(NSData *)data type:(MP42TagArtworkType)type;
- (instancetype)initWithBytes:(const void *)bytes length:(NSUInteger)length type:(MP42TagArtworkType)type;
@property(atomic, readonly) NSImage *image;
@property(atomic, readonly) NSURL *url;
@property(atomic, readonly) NSData *data;
@property(atomic, readonly, nullable) NSImage *image;
@property(atomic, readonly, nullable) NSURL *url;
@property(atomic, readonly, nullable) NSData *data;
@property(atomic, readonly) MP42TagArtworkType type;
@end
NS_ASSUME_NONNULL_END
+1 -1
View File
@@ -77,7 +77,7 @@
return copy;
}
- (NSImage *)imageFromData:(NSData *)data
- (nullable NSImage *)imageFromData:(NSData *)data
{
NSImage *image = nil;
NSBitmapImageRep *imageRep = [NSBitmapImageRep imageRepWithData:data];