From 2e46fdc8fd9d7179fa4297b2a4ebfc1e284265f9 Mon Sep 17 00:00:00 2001 From: relikd Date: Fri, 17 Jan 2020 22:26:54 +0100 Subject: [PATCH] NS_ASSUME_NONNULL --- RSXML2/NSDictionary+RSXML.h | 4 ++++ RSXML2/NSString+RSXML.h | 3 +++ RSXML2/RSHTMLMetadata.h | 4 ++++ RSXML2/RSOPMLItem.h | 6 +++++- RSXML2/RSParsedArticle.h | 3 +++ RSXML2/RSParsedFeed.h | 4 ++++ RSXML2/RSXMLData.h | 4 ++++ RSXML2/RSXMLParser.h | 5 ++++- 8 files changed, 31 insertions(+), 2 deletions(-) diff --git a/RSXML2/NSDictionary+RSXML.h b/RSXML2/NSDictionary+RSXML.h index a2eddba..cb33701 100644 --- a/RSXML2/NSDictionary+RSXML.h +++ b/RSXML2/NSDictionary+RSXML.h @@ -23,6 +23,10 @@ #import +NS_ASSUME_NONNULL_BEGIN + @interface NSDictionary (RSXML) - (nullable id)rsxml_objectForCaseInsensitiveKey:(NSString *)key; @end + +NS_ASSUME_NONNULL_END diff --git a/RSXML2/NSString+RSXML.h b/RSXML2/NSString+RSXML.h index 15b8ea1..9c0de6e 100644 --- a/RSXML2/NSString+RSXML.h +++ b/RSXML2/NSString+RSXML.h @@ -24,6 +24,8 @@ @import Foundation; +NS_ASSUME_NONNULL_BEGIN + @interface NSString (RSXML) - (NSString *)rsxml_stringByDecodingHTMLEntities; @@ -32,3 +34,4 @@ @end +NS_ASSUME_NONNULL_END diff --git a/RSXML2/RSHTMLMetadata.h b/RSXML2/RSHTMLMetadata.h index 74ef06c..973e9c4 100644 --- a/RSXML2/RSHTMLMetadata.h +++ b/RSXML2/RSHTMLMetadata.h @@ -31,6 +31,8 @@ typedef enum { RSFeedTypeAtom } RSFeedType; +NS_ASSUME_NONNULL_BEGIN + RSFeedType RSFeedTypeFromLinkTypeAttribute(NSString * typeStr); @@ -65,3 +67,5 @@ RSFeedType RSFeedTypeFromLinkTypeAttribute(NSString * typeStr); @interface RSHTMLMetadataAnchor : RSHTMLMetadataLink // title: anchor text-value @property (nonatomic, copy, nullable) NSString *tooltip; @end + +NS_ASSUME_NONNULL_END diff --git a/RSXML2/RSOPMLItem.h b/RSXML2/RSOPMLItem.h index 0d9a62b..a759857 100644 --- a/RSXML2/RSOPMLItem.h +++ b/RSXML2/RSOPMLItem.h @@ -27,6 +27,8 @@ #define OPML_EXPORT 0 #endif +NS_ASSUME_NONNULL_BEGIN + // OPML allows for arbitrary attributes. // These are the common attributes in OPML files used as RSS subscription lists. @@ -55,7 +57,7 @@ /// Sets a value in the internal dictionary (creates new empty dictionary if necessary). - (void)setAttribute:(id)value forKey:(NSString *)key; /// @return Value for key (case-independent). -- (id)attributeForKey:(NSString *)key; +- (nullable id)attributeForKey:(NSString *)key; /// Print object description for debugging purposes. - (NSString *)recursiveDescription; @@ -64,3 +66,5 @@ - (NSXMLDocument *)exportXML; #endif @end + +NS_ASSUME_NONNULL_END diff --git a/RSXML2/RSParsedArticle.h b/RSXML2/RSParsedArticle.h index 13a69df..63dcfd3 100755 --- a/RSXML2/RSParsedArticle.h +++ b/RSXML2/RSParsedArticle.h @@ -24,6 +24,8 @@ @import Foundation; +NS_ASSUME_NONNULL_BEGIN + /// Parsed result type for articles. Does contain article specific attributes like abstract and content. @interface RSParsedArticle : NSObject @property (nonatomic, readonly, nonnull) NSURL *feedURL; @@ -47,3 +49,4 @@ @end +NS_ASSUME_NONNULL_END diff --git a/RSXML2/RSParsedFeed.h b/RSXML2/RSParsedFeed.h index a1df2d6..8adc7a9 100755 --- a/RSXML2/RSParsedFeed.h +++ b/RSXML2/RSParsedFeed.h @@ -24,6 +24,8 @@ @import Foundation; +NS_ASSUME_NONNULL_BEGIN + @class RSParsedArticle; /// Parsed result type for feeds. Does contain feed specific attributes and a sorted list or articles. @@ -41,3 +43,5 @@ - (RSParsedArticle *)appendNewArticle; @end + +NS_ASSUME_NONNULL_END diff --git a/RSXML2/RSXMLData.h b/RSXML2/RSXMLData.h index 95c6464..b12c3d5 100644 --- a/RSXML2/RSXMLData.h +++ b/RSXML2/RSXMLData.h @@ -25,6 +25,8 @@ @import Foundation; #import "RSXMLParser.h" +NS_ASSUME_NONNULL_BEGIN + @class RSXMLParser; /// Wrapper class for xml data. Returns the designated parser for any given xml data. @@ -42,3 +44,5 @@ - (BOOL)canParseData; @end + +NS_ASSUME_NONNULL_END diff --git a/RSXML2/RSXMLParser.h b/RSXML2/RSXMLParser.h index 846304f..65945e9 100644 --- a/RSXML2/RSXMLParser.h +++ b/RSXML2/RSXMLParser.h @@ -29,6 +29,8 @@ @class RSXMLData; +NS_ASSUME_NONNULL_BEGIN + // --------------------------------------------------------------- // | MARK: - Parser Delegate // --------------------------------------------------------------- @@ -55,7 +57,7 @@ /// @return @c YES if parser supports parsing HTML files. + (BOOL)isHTMLParser; /// Will be called after the parsing is finished. @return Reference to parsed object. -- (id)xmlParserWillReturnDocument; +- (nullable id)xmlParserWillReturnDocument; @end @@ -91,3 +93,4 @@ @end +NS_ASSUME_NONNULL_END