Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings #880

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions YYText/Utility/YYTextUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,13 @@ static inline CGRect YYTextEmojiGetGlyphBoundingRectWithFontSize(CGFloat fontSiz
Get the character set which should rotate in vertical form.
@return The shared character set.
*/
NSCharacterSet *YYTextVerticalFormRotateCharacterSet();
NSCharacterSet *YYTextVerticalFormRotateCharacterSet(void);

/**
Get the character set which should rotate and move in vertical form.
@return The shared character set.
*/
NSCharacterSet *YYTextVerticalFormRotateAndMoveCharacterSet();
NSCharacterSet *YYTextVerticalFormRotateAndMoveCharacterSet(void);



Expand Down Expand Up @@ -364,10 +364,10 @@ static inline CGFloat YYTextCGPointGetDistanceToRect(CGPoint p, CGRect r) {


/// Get main screen's scale.
CGFloat YYTextScreenScale();
CGFloat YYTextScreenScale(void);

/// Get main screen's size. Height is always larger than width.
CGSize YYTextScreenSize();
CGSize YYTextScreenSize(void);

/// Convert point to pixel.
static inline CGFloat YYTextCGFloatToPixel(CGFloat value) {
Expand Down Expand Up @@ -555,9 +555,9 @@ static inline CFRange YYTextCFRangeFromNSRange(NSRange range) {


/// Returns YES in App Extension.
BOOL YYTextIsAppExtension();
BOOL YYTextIsAppExtension(void);

/// Returns nil in App Extension.
UIApplication * _Nullable YYTextSharedApplication();
UIApplication * _Nullable YYTextSharedApplication(void);

NS_ASSUME_NONNULL_END
12 changes: 6 additions & 6 deletions YYText/Utility/YYTextUtilities.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#import <Accelerate/Accelerate.h>
#import "UIView+YYText.h"

NSCharacterSet *YYTextVerticalFormRotateCharacterSet() {
NSCharacterSet *YYTextVerticalFormRotateCharacterSet(void) {
static NSMutableCharacterSet *set;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
Expand Down Expand Up @@ -56,7 +56,7 @@
return set;
}

NSCharacterSet *YYTextVerticalFormRotateAndMoveCharacterSet() {
NSCharacterSet *YYTextVerticalFormRotateAndMoveCharacterSet(void) {
static NSMutableCharacterSet *set;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
Expand Down Expand Up @@ -99,7 +99,7 @@ static int matrix_invert(__CLPK_integer N, double *matrix) {
return error;
}

CGAffineTransform YYTextCGAffineTransformGetFromPoints(CGPoint before[3], CGPoint after[3]) {
CGAffineTransform YYTextCGAffineTransformGetFromPoints(CGPoint before[_Nullable 3], CGPoint after[_Nullable 3]) {
if (before == NULL || after == NULL) return CGAffineTransformIdentity;

CGPoint p1, p2, p3, q1, q2, q3;
Expand Down Expand Up @@ -266,7 +266,7 @@ CGRect YYTextCGRectFitWithContentMode(CGRect rect, CGSize size, UIViewContentMod
return rect;
}

CGFloat YYTextScreenScale() {
CGFloat YYTextScreenScale(void) {
static CGFloat scale;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
Expand All @@ -275,7 +275,7 @@ CGFloat YYTextScreenScale() {
return scale;
}

CGSize YYTextScreenSize() {
CGSize YYTextScreenSize(void) {
static CGSize size;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
Expand All @@ -290,7 +290,7 @@ CGSize YYTextScreenSize() {
}


BOOL YYTextIsAppExtension() {
BOOL YYTextIsAppExtension(void) {
static BOOL isAppExtension = NO;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
Expand Down
16 changes: 16 additions & 0 deletions YYText/YYText.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ FOUNDATION_EXPORT const unsigned char YYTextVersionString[];
#import <YYText/NSAttributedString+YYText.h>
#import <YYText/NSParagraphStyle+YYText.h>
#import <YYText/UIPasteboard+YYText.h>
#import <YYText/YYTextSelectionView.h>
#import <YYText/UIView+YYText.h>
#import <YYText/YYTextTransaction.h>
#import <YYText/YYTextWeakProxy.h>
#import <YYText/YYTextAsyncLayer.h>
#import <YYText/YYTextMagnifier.h>
#import <YYText/YYTextEffectWindow.h>
#import <YYText/YYTextContainerView.h>
#else
#import "YYLabel.h"
#import "YYTextView.h"
Expand All @@ -47,4 +55,12 @@ FOUNDATION_EXPORT const unsigned char YYTextVersionString[];
#import "NSAttributedString+YYText.h"
#import "NSParagraphStyle+YYText.h"
#import "UIPasteboard+YYText.h"
#import "YYTextSelectionView.h"
#import "UIView+YYText.h"
#import "YYTextTransaction.h"
#import "YYTextWeakProxy.h"
#import "YYTextAsyncLayer.h"
#import "YYTextMagnifier.h"
#import "YYTextEffectWindow.h"
#import "YYTextContainerView.h"
#endif