Add nullability annotations to MP42Image.
This commit is contained in:
2 files changed
+8
-4
No files matched your search
+7
-3
@@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@class NSImage;
|
@class NSImage;
|
||||||
|
|
||||||
typedef enum MP42TagArtworkType_e {
|
typedef enum MP42TagArtworkType_e {
|
||||||
@@ -25,9 +27,11 @@ typedef enum MP42TagArtworkType_e {
|
|||||||
- (instancetype)initWithData:(NSData *)data type:(MP42TagArtworkType)type;
|
- (instancetype)initWithData:(NSData *)data type:(MP42TagArtworkType)type;
|
||||||
- (instancetype)initWithBytes:(const void *)bytes length:(NSUInteger)length type:(MP42TagArtworkType)type;
|
- (instancetype)initWithBytes:(const void *)bytes length:(NSUInteger)length type:(MP42TagArtworkType)type;
|
||||||
|
|
||||||
@property(atomic, readonly) NSImage *image;
|
@property(atomic, readonly, nullable) NSImage *image;
|
||||||
@property(atomic, readonly) NSURL *url;
|
@property(atomic, readonly, nullable) NSURL *url;
|
||||||
@property(atomic, readonly) NSData *data;
|
@property(atomic, readonly, nullable) NSData *data;
|
||||||
@property(atomic, readonly) MP42TagArtworkType type;
|
@property(atomic, readonly) MP42TagArtworkType type;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
+1
-1
@@ -77,7 +77,7 @@
|
|||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSImage *)imageFromData:(NSData *)data
|
- (nullable NSImage *)imageFromData:(NSData *)data
|
||||||
{
|
{
|
||||||
NSImage *image = nil;
|
NSImage *image = nil;
|
||||||
NSBitmapImageRep *imageRep = [NSBitmapImageRep imageRepWithData:data];
|
NSBitmapImageRep *imageRep = [NSBitmapImageRep imageRepWithData:data];
|
||||||
|
|||||||
Reference in new issue
Block a user