Skip to content

Commit 0a3e665

Browse files
volodgHeshamMegid
authored andcommitted
fix Version 8.3 beta 2 (8W120l) compilation warnings (#271)
1 parent ab61efc commit 0a3e665

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

HMSegmentedControl.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@
370370
CLANG_WARN_INFINITE_RECURSION = YES;
371371
CLANG_WARN_INT_CONVERSION = YES;
372372
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
373+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
373374
CLANG_WARN_SUSPICIOUS_MOVES = YES;
374375
CLANG_WARN_UNREACHABLE_CODE = YES;
375376
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -421,6 +422,7 @@
421422
CLANG_WARN_INFINITE_RECURSION = YES;
422423
CLANG_WARN_INT_CONVERSION = YES;
423424
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
425+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
424426
CLANG_WARN_SUSPICIOUS_MOVES = YES;
425427
CLANG_WARN_UNREACHABLE_CODE = YES;
426428
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;

HMSegmentedControl/HMSegmentedControl.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ - (void)drawRect:(CGRect)rect {
303303
rect = CGRectMake((self.segmentWidth * idx) + (self.segmentWidth - stringWidth) / 2, y, stringWidth, stringHeight);
304304
rectDiv = CGRectMake((self.segmentWidth * idx) - (self.verticalDividerWidth / 2), self.selectionIndicatorHeight * 2, self.verticalDividerWidth, self.frame.size.height - (self.selectionIndicatorHeight * 4));
305305
fullRect = CGRectMake(self.segmentWidth * idx, 0, self.segmentWidth, oldRect.size.height);
306-
} else if (self.segmentWidthStyle == HMSegmentedControlSegmentWidthStyleDynamic) {
306+
} else {
307307
// When we are drawing dynamic widths, we need to loop the widths array to calculate the xOffset
308308
CGFloat xOffset = 0;
309309
NSInteger i = 0;
@@ -760,7 +760,7 @@ - (void)scrollToSelectedSegmentIndex:(BOOL)animated {
760760
self.frame.size.height);
761761

762762
selectedSegmentOffset = (CGRectGetWidth(self.frame) / 2) - (self.segmentWidth / 2);
763-
} else if (self.segmentWidthStyle == HMSegmentedControlSegmentWidthStyleDynamic) {
763+
} else {
764764
NSInteger i = 0;
765765
CGFloat offsetter = 0;
766766
for (NSNumber *width in self.segmentWidthsArray) {

0 commit comments

Comments
 (0)