Skip to content

Commit a8a2ff4

Browse files
committed
Remove incorrect _Nullable and add const to options arguments
1 parent 15d7e8f commit a8a2ff4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ios/RNTextSize.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ - (NSString *)fontStyleFromTraits:(const NSDictionary *)traits
573573
return count ? [NSArray arrayWithObjects:outArr count:count] : nil;
574574
}
575575

576-
- (CGSize)maxSizeFromOptions:(NSDictionary * _Nullable)options
576+
- (CGSize)maxSizeFromOptions:(const NSDictionary *)options
577577
{
578578
const CGFloat optWidth = CGFloatValueFrom(options[@"width"]);
579579
const CGFloat maxWidth = isnan(optWidth) || isinf(optWidth) ? CGFLOAT_MAX : optWidth;
@@ -584,7 +584,7 @@ - (CGSize)maxSizeFromOptions:(NSDictionary * _Nullable)options
584584
/**
585585
* Creates a textContainer with the width and numberOfLines from options.
586586
*/
587-
- (NSTextContainer *)textContainerFromOptions:(NSDictionary * _Nullable)options
587+
- (NSTextContainer *)textContainerFromOptions:(const NSDictionary *)options
588588
withMaxSize:(CGSize)maxSize
589589
{
590590
NSTextContainer *textContainer = [[NSTextContainer alloc] initWithSize:maxSize];
@@ -603,7 +603,7 @@ - (NSTextContainer *)textContainerFromOptions:(NSDictionary * _Nullable)options
603603
* Creates attributes that should be passed into the TextStorage based on
604604
* parameters and the options the user passes in.
605605
*/
606-
- (NSDictionary<NSAttributedStringKey,id> *const)textStorageAttributesFromOptions:(NSDictionary * _Nullable)options
606+
- (NSDictionary<NSAttributedStringKey,id> *const)textStorageAttributesFromOptions:(const NSDictionary *)options
607607
withFont:(UIFont *const _Nullable)font
608608
withLetterSpacing:(CGFloat)letterSpacing
609609
{
@@ -634,9 +634,9 @@ - (CGFloat)fontScaleMultiplier {
634634
* React Native ceils sizes to the nearest pixels by default, so we usually
635635
* want to adjust it to that
636636
*/
637-
- (CGFloat)adjustMeasuredSize:(const CGFloat)size
638-
withOptions:(NSDictionary *)options
639-
withMaxSize:(const CGFloat)maxSize
637+
- (CGFloat)adjustMeasuredSize:(CGFloat)size
638+
withOptions:(const NSDictionary *)options
639+
withMaxSize:(CGFloat)maxSize
640640
{
641641
CGFloat adjusted = size;
642642

0 commit comments

Comments
 (0)