From cfc3cc38a2762c71f4a24bf2abb9ac67e6e4e708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?arvinytan=28=E8=B0=AD=E5=AE=87=29?= Date: Wed, 7 Sep 2016 13:35:51 +0800 Subject: [PATCH] Add nullable/nonnull to avoid complier complain --- Pod/Classes/Data/GDCSerializable.h | 6 +++--- Pod/Classes/Data/GDCUrlCache.h | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Pod/Classes/Data/GDCSerializable.h b/Pod/Classes/Data/GDCSerializable.h index ef21c56..3c09cc8 100644 --- a/Pod/Classes/Data/GDCSerializable.h +++ b/Pod/Classes/Data/GDCSerializable.h @@ -4,7 +4,7 @@ #import -static NSString *const kJsonTypeKey = @"@type"; +static NSString *const _Nonnull kJsonTypeKey = @"@type"; @protocol GDCSerializable /// Creates a new instance by parsing Json format. If @@ -16,7 +16,7 @@ static NSString *const kJsonTypeKey = @"@type"; /// the data can not be parsed. /// /// @return A new instance of the class messaged. -+ (instancetype)parseFromJson:(nullable NSDictionary *)json error:(NSError **)errorPtr; ++ (nullable instancetype)parseFromJson:(nullable NSDictionary *)json error:(NSError *_Nullable * _Nullable)errorPtr; /// Parses json patches of this type and merges it with this message. /// @@ -33,5 +33,5 @@ static NSString *const kJsonTypeKey = @"@type"; /// Merges the fields from another message (of the same type) into this /// message. -- (void)mergeFrom:(id)other; +- (void)mergeFrom:(nullable id)other; @end \ No newline at end of file diff --git a/Pod/Classes/Data/GDCUrlCache.h b/Pod/Classes/Data/GDCUrlCache.h index dd23707..e3e916f 100644 --- a/Pod/Classes/Data/GDCUrlCache.h +++ b/Pod/Classes/Data/GDCUrlCache.h @@ -7,7 +7,7 @@ @class GPBMessage; @class GPBFieldMask; - +NS_ASSUME_NONNULL_BEGIN @interface GDCUrlCache : NSObject + (GDCUrlCache *)instance; @@ -15,4 +15,5 @@ - (nullable __kindof GPBMessage *)cachedMessageForPath:(NSString *)path andRequest:(GPBMessage *)reqMessage andKeys:(GPBFieldMask *)keys expired:(BOOL *)expired; -@end \ No newline at end of file +@end +NS_ASSUME_NONNULL_END \ No newline at end of file