From b11d24d522f4cade47ba33b01383c2c3076ba275 Mon Sep 17 00:00:00 2001 From: Bei Li Date: Tue, 11 Feb 2020 19:44:42 +0800 Subject: [PATCH] Use NS_ASSUME_NONNULL macro --- .gitignore | 1 + .../LocalizedStringKit.xcodeproj/project.pbxproj | 2 +- .../LocalizedStringKit/LocalizedStringKit.h | 10 +++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 328f22b..322a9b6 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ pyvenv.cfg **/*.egg-info/* generation/bin/* generation/dist +.DS_Store diff --git a/LocalizedStringKit/LocalizedStringKit.xcodeproj/project.pbxproj b/LocalizedStringKit/LocalizedStringKit.xcodeproj/project.pbxproj index 423daad..e092203 100644 --- a/LocalizedStringKit/LocalizedStringKit.xcodeproj/project.pbxproj +++ b/LocalizedStringKit/LocalizedStringKit.xcodeproj/project.pbxproj @@ -78,8 +78,8 @@ DDF2F98523DF3FA400B7E8E9 /* LocalizedStringKit */ = { isa = PBXGroup; children = ( - DDF2F99D23DF401600B7E8E9 /* LocalizedStringKit.m */, DDF2F98623DF3FA400B7E8E9 /* LocalizedStringKit.h */, + DDF2F99D23DF401600B7E8E9 /* LocalizedStringKit.m */, DDF2F98723DF3FA400B7E8E9 /* Info.plist */, ); path = LocalizedStringKit; diff --git a/LocalizedStringKit/LocalizedStringKit/LocalizedStringKit.h b/LocalizedStringKit/LocalizedStringKit/LocalizedStringKit.h index d0aa64a..be1e78c 100644 --- a/LocalizedStringKit/LocalizedStringKit/LocalizedStringKit.h +++ b/LocalizedStringKit/LocalizedStringKit/LocalizedStringKit.h @@ -4,6 +4,8 @@ @import Foundation; +NS_ASSUME_NONNULL_BEGIN + //! Project version number for LocalizedStringKit. FOUNDATION_EXPORT double LocalizedStringKitVersionNumber; @@ -14,7 +16,7 @@ FOUNDATION_EXPORT const unsigned char LocalizedStringKitVersionString[]; /// /// The `value` should be the English string and the `comment` should give context on where the string is used. /// Ex: `Localized("Cancel", "Action sheet action title") -NSString * _Nonnull Localized(NSString * _Nonnull value, NSString * _Nonnull comment); +NSString *Localized(NSString *value, NSString *comment); /// Additional localization function used to localize strings /// @@ -24,11 +26,13 @@ NSString * _Nonnull Localized(NSString * _Nonnull value, NSString * _Nonnull com /// /// Ex: `LocalizedWithKeyExtension("Archive", "Button title", "Archive action") /// Ex: `LocalizedWithKeyExtension("Archive", "Folder title", "Archive folder") -NSString * _Nonnull LocalizedWithKeyExtension(NSString * _Nonnull value, NSString * _Nonnull comment, NSString * _Nonnull keyExtension); +NSString *LocalizedWithKeyExtension(NSString *value, NSString *comment, NSString *keyExtension); /// Marks a string as not needing localization (to avoid false positives from /// the static analyzer -NSString * _Nonnull LocalizationUnnecessary(NSString * _Nonnull value); +NSString *LocalizationUnnecessary(NSString *value); /// Load the bundle which contains the localized strings NSBundle * _Nullable getLocalizedStringKitBundle(void); + +NS_ASSUME_NONNULL_END