Skip to content

Commit a2b678e

Browse files
Dirsha AndreyДенис Морозов
authored andcommitted
New xcode optimiaztions (NOISSUE)
1 parent 35958dd commit a2b678e

17 files changed

Lines changed: 39 additions & 39 deletions

Src/Core/FTCTextEntryFormatCoordinator.m

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ - (void)userReplacedInFormattedValueSubstringAtRange:(NSRange)range withString:(
5959
{
6060
assert( nil != replacement );
6161
assert( isEditing );
62-
assert( (nil != editingFormatter) && @"'editingFormatter' must not be nil here." );
62+
assert( (nil != editingFormatter) && "'editingFormatter' must not be nil here." );
6363

6464
NSRange replacementRangeInRawValue = [editingFormatter rangeInRawValueForRange:range inFormattedValue:_formattedValue];
6565

@@ -86,7 +86,7 @@ - (void)userReplacedInFormattedValueSubstringAtRange:(NSRange)range withString:(
8686
- (void)beginEditing
8787
{
8888
assert( NO == isEditing );
89-
assert( (nil != editingFormatter) && @"'editingFormatter' must not be nil here." );
89+
assert( (nil != editingFormatter) && "'editingFormatter' must not be nil here." );
9090

9191
isEditing = YES;
9292

@@ -99,7 +99,7 @@ - (void)moveCaretToTheEndOfRawValue
9999
currentSelectionRangeInRawValue = NSMakeRange(_rawValue.length, 0);
100100

101101
id<FTCTextEntryFormatter> currentFormatter = isEditing ? editingFormatter : notEditingFormatter;
102-
assert( (nil != currentFormatter) && @"'currentFormatter' must not be nil here." );
102+
assert( (nil != currentFormatter) && "'currentFormatter' must not be nil here." );
103103

104104
_currentSelectionRangeInFormattedValue = [currentFormatter rangeInFormattedValueForRange:currentSelectionRangeInRawValue inRawValue:_rawValue];
105105
}
@@ -118,7 +118,7 @@ - (void)endEditing
118118
- (void)doFormatValue
119119
{
120120
id<FTCTextEntryFormatter> currentFormatter = isEditing ? editingFormatter : notEditingFormatter;
121-
assert( (nil != currentFormatter) && @"'currentFormatter' must not be nil here." );
121+
assert( (nil != currentFormatter) && "'currentFormatter' must not be nil here." );
122122

123123
_formattedValue = [currentFormatter formattedFromRaw:(nil != _rawValue ? _rawValue : @"")];
124124
}
@@ -137,11 +137,11 @@ - (void)setRawValue:(NSString *)rawValue
137137

138138
- (void)applyConfig:(FTCTextEntryFormattingConfig *)config
139139
{
140-
assert( (nil != config) && @"Argument 'config' must not be nil." );
141-
assert( (nil != config.editingFormatter) && @"'config.editingFormatter' must not be nil here." );
142-
assert( (nil != config.editingInputFilter) && @"'config.editingInputFilter' must not be nil here." );
143-
assert( (nil != config.notEditingFormatter) && @"'config.notEditingFormatter' must not be nil here." );
144-
assert( (nil != config.notEditingInputFilter) && @"'config.notEditingInputFilter' must not be nil here." );
140+
assert( (nil != config) && "Argument 'config' must not be nil." );
141+
assert( (nil != config.editingFormatter) && "'config.editingFormatter' must not be nil here." );
142+
assert( (nil != config.editingInputFilter) && "'config.editingInputFilter' must not be nil here." );
143+
assert( (nil != config.notEditingFormatter) && "'config.notEditingFormatter' must not be nil here." );
144+
assert( (nil != config.notEditingInputFilter) && "'config.notEditingInputFilter' must not be nil here." );
145145

146146
editingFormatter = config.editingFormatter;
147147
editingInputFilter = config.editingInputFilter;
@@ -162,7 +162,7 @@ - (void)doSetRawValue:(nullable NSString *)rawValue
162162

163163
- (nullable NSString *)filterValue:(nullable NSString *)value
164164
{
165-
assert( (nil != notEditingInputFilter) && @"'notEditingInputFilter' must not be nil here." );
165+
assert( (nil != notEditingInputFilter) && "'notEditingInputFilter' must not be nil here." );
166166

167167
if( nil == value )
168168
{

Src/Core/FTCTextEntryFormatCoordinatorHelper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
2525

2626
@interface FTCTextEntryFormatCoordinatorHelper : NSObject
2727

28-
@property (nonatomic, nullable, copy) void (^didChangeValueHandler)();
28+
@property (nonatomic, nullable, copy) void (^didChangeValueHandler)(void);
2929

3030
@property (nonatomic, nullable, copy) NSString *rawValue;
3131

Src/Core/FTCTextEntryFormattingConfig.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,28 +39,28 @@ - (instancetype)init
3939

4040
- (void)setEditingFormatter:(id<FTCTextEntryFormatter>)editingFormatter
4141
{
42-
assert( (nil != editingFormatter) && @"Argument 'editingFormatter' must not be nil." );
42+
assert( (nil != editingFormatter) && "Argument 'editingFormatter' must not be nil." );
4343

4444
_editingFormatter = editingFormatter;
4545
}
4646

4747
- (void)setEditingInputFilter:(id<FTCTextEntryEditingInputFilter>)editingInputFilter
4848
{
49-
assert( (nil != editingInputFilter) && @"Argument 'editingInputFilter' must not be nil." );
49+
assert( (nil != editingInputFilter) && "Argument 'editingInputFilter' must not be nil." );
5050

5151
_editingInputFilter = editingInputFilter;
5252
}
5353

5454
- (void)setNotEditingFormatter:(id<FTCTextEntryFormatter>)notEditingFormatter
5555
{
56-
assert( (nil != notEditingFormatter) && @"Argument 'notEditingFormatter' must not be nil." );
56+
assert( (nil != notEditingFormatter) && "Argument 'notEditingFormatter' must not be nil." );
5757

5858
_notEditingFormatter = notEditingFormatter;
5959
}
6060

6161
- (void)setNotEditingInputFilter:(id<FTCTextEntryNotEditingInputFilter>)notEditingInputFilter
6262
{
63-
assert( (nil != notEditingInputFilter) && @"Argument 'notEditingInputFilter' must not be nil." );
63+
assert( (nil != notEditingInputFilter) && "Argument 'notEditingInputFilter' must not be nil." );
6464

6565
_notEditingInputFilter = notEditingInputFilter;
6666
}

Src/Core/Formatting/MaskFormatter/FTCMaskFormatter.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ - (NSString *)formattedFromRaw:(NSString *)rawValue
7474

7575
- (NSRange)rangeInFormattedValueForRange:(NSRange)rangeInRawValue inRawValue:(NSString *)rawValue
7676
{
77-
assert( (rawValue.length >= rangeInRawValue.location + rangeInRawValue.length) && @"Argument 'rangeInRawValue' is out of bounds of 'rawValue'" );
77+
assert( (rawValue.length >= rangeInRawValue.location + rangeInRawValue.length) && "Argument 'rangeInRawValue' is out of bounds of 'rawValue'" );
7878

7979
if( 0 == rangeInRawValue.location )
8080
{
@@ -171,7 +171,7 @@ - (NSUInteger)countOfRawSymbolsInFormattedString:(nullable NSString *const)forma
171171

172172
- (instancetype)init
173173
{
174-
assert( false && @"Won't happen" );
174+
assert( false && "Won't happen" );
175175
return nil;
176176
}
177177

Src/Core/Formatting/MaskFormatter/FTCMaskFormatterGenericConfig.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ - (instancetype)initWithMask:(NSString *)mask maskCharacter:(NSString *)maskChar
5353

5454
- (instancetype)init
5555
{
56-
assert( false && @"Won't happen" );
56+
assert( false && "Won't happen" );
5757
return nil;
5858
}
5959

Src/Core/Formatting/PostfixFormatter/FTCPostfixFormatter.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ @implementation FTCPostfixFormatter
2424

2525
- (instancetype)init
2626
{
27-
assert(false && @"Won't happen");
27+
assert(false && "Won't happen");
2828
return nil;
2929
}
3030

@@ -73,7 +73,7 @@ - (NSString *)formattedFromRaw:(NSString *)rawValue
7373

7474
- (NSRange)rangeInFormattedValueForRange:(NSRange)rangeInRawValue inRawValue:(NSString *)rawValue
7575
{
76-
assert( (rawValue.length >= rangeInRawValue.location + rangeInRawValue.length) && @"Argument 'rangeInRawValue' is out of bounds of 'rawValue'" );
76+
assert( (rawValue.length >= rangeInRawValue.location + rangeInRawValue.length) && "Argument 'rangeInRawValue' is out of bounds of 'rawValue'" );
7777

7878
return rangeInRawValue;
7979
}

Src/Core/InputFiltering/DigitsValueFilter/FTCDigitsValueFilter.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ - (instancetype)initWithMaxLength:(NSUInteger)aLength
3535

3636
- (FTCFilteredString *)replaceSubstringInString:(NSString *)originalString atRange:(NSRange)range withString:(NSString *)replacement shouldTrim:(BOOL)shouldTrim
3737
{
38-
assert( (nil != originalString) && @"Argument 'originalString' must not be nil." );
39-
assert( (nil != replacement) && @"Argument 'replacement' must not be nil." );
38+
assert( (nil != originalString) && "Argument 'originalString' must not be nil." );
39+
assert( (nil != replacement) && "Argument 'replacement' must not be nil." );
4040

4141
NSString *filteredReplacement = [FTCTextEntryFormattingStringUtils stringWithDecimalDigitsFromString:replacement];
4242

Src/Core/InputFiltering/FTCNoFilteringFilter.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ - (instancetype)init
3232

3333
- (FTCFilteredString *)replaceSubstringInString:(NSString *)originalString atRange:(NSRange)range withString:(NSString *)replacement
3434
{
35-
assert( (nil != originalString) && @"Argument 'originalString' must not be nil." );
36-
assert( (nil != replacement) && @"Argument 'replacement' must not be nil." );
35+
assert( (nil != originalString) && "Argument 'originalString' must not be nil." );
36+
assert( (nil != replacement) && "Argument 'replacement' must not be nil." );
3737

3838
NSString *resultString = [originalString stringByReplacingCharactersInRange:range withString:replacement];
3939
const NSRange resultRange = NSMakeRange(range.location, replacement.length);

Src/Core/InputFiltering/LimitedLengthInputFilter/FTCLimitedLengthInputFilter.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ @implementation FTCLimitedLengthInputFilter
2828

2929
- (instancetype)init
3030
{
31-
assert( false && @"Won't happen" );
31+
assert( false && "Won't happen" );
3232
return nil;
3333
}
3434

@@ -43,7 +43,7 @@ - (instancetype)initWithMaximumLength:(NSUInteger)maximumLength
4343

4444
- (NSString *)trimmedString:(NSString *)string
4545
{
46-
assert( nil != string && @"String must not be nil" );
46+
assert( nil != string && "String must not be nil" );
4747

4848
if( string.length > maxLength )
4949
{
@@ -55,8 +55,8 @@ - (NSString *)trimmedString:(NSString *)string
5555

5656
- (FTCFilteredString *)replaceSubstringInString:(NSString *)originalString atRange:(NSRange)range withString:(NSString *)replacement
5757
{
58-
assert( (nil != originalString) && @"Argument 'originalString' must not be nil." );
59-
assert( (nil != replacement) && @"Argument 'replacement' must not be nil." );
58+
assert( (nil != originalString) && "Argument 'originalString' must not be nil." );
59+
assert( (nil != replacement) && "Argument 'replacement' must not be nil." );
6060

6161
NSString *replacedString = [originalString stringByReplacingCharactersInRange:range withString:replacement];;
6262

Src/Core/InputFiltering/ToUpperCaseInputFilter/FTCToUpperCaseInputFilter.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ - (instancetype)init
3232

3333
- (FTCFilteredString *)replaceSubstringInString:(NSString *)originalString atRange:(NSRange)range withString:(NSString *)replacement
3434
{
35-
assert( (nil != originalString) && @"Argument 'originalString' must not be nil." );
36-
assert( (nil != replacement) && @"Argument 'replacement' must not be nil." );
35+
assert( (nil != originalString) && "Argument 'originalString' must not be nil." );
36+
assert( (nil != replacement) && "Argument 'replacement' must not be nil." );
3737

3838
NSString * const upperCaseReplacement = [replacement uppercaseString];
3939

0 commit comments

Comments
 (0)