From d299cd6e7e76b7c6580dfc1dfa87c7d377db087f Mon Sep 17 00:00:00 2001 From: Amro Mousa Date: Thu, 9 Apr 2015 09:43:18 -0700 Subject: [PATCH] Fix warnings in Xcode 6.3 These warnings are problematic for those who build with warnings as errors. --- Classes/JBBarChartView.m | 3 +++ Classes/JBChartView.m | 3 +++ Classes/JBLineChartView.m | 9 ++++++--- .../Controllers/JBBarChartViewController.m | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Classes/JBBarChartView.m b/Classes/JBBarChartView.m index 6cdd346ea..665f140bd 100644 --- a/Classes/JBBarChartView.m +++ b/Classes/JBBarChartView.m @@ -57,6 +57,9 @@ - (void)setVerticalSelectionViewVisible:(BOOL)verticalSelectionViewVisible anima @implementation JBBarChartView +@dynamic dataSource; +@dynamic delegate; + #pragma mark - Alloc/Init + (void)initialize diff --git a/Classes/JBChartView.m b/Classes/JBChartView.m index 6589eb8cc..20e4b4abf 100644 --- a/Classes/JBChartView.m +++ b/Classes/JBChartView.m @@ -29,6 +29,9 @@ - (void)validateHeaderAndFooterHeights; @implementation JBChartView +@synthesize dataSource; +@synthesize delegate; + #pragma mark - Alloc/Init - (id)initWithCoder:(NSCoder *)aDecoder diff --git a/Classes/JBLineChartView.m b/Classes/JBLineChartView.m index f8099f28b..a900ed9f0 100755 --- a/Classes/JBLineChartView.m +++ b/Classes/JBLineChartView.m @@ -187,6 +187,9 @@ - (void)setVerticalSelectionViewVisible:(BOOL)verticalSelectionViewVisible anima @implementation JBLineChartView +@dynamic dataSource; +@dynamic delegate; + #pragma mark - Alloc/Init + (void)initialize @@ -900,9 +903,9 @@ - (NSInteger)horizontalIndexForPoint:(CGPoint)point indexClamp:(JBLineChartHoriz for (JBLineChartPoint *lineChartPoint in lineData) { BOOL clamped = (indexClamp == JBLineChartHorizontalIndexClampNone) ? YES : (indexClamp == JBLineChartHorizontalIndexClampLeft) ? (point.x - lineChartPoint.position.x >= 0) : (point.x - lineChartPoint.position.x <= 0); - if ((abs(point.x - lineChartPoint.position.x)) < currentDistance && clamped == YES) + if ((fabs(point.x - lineChartPoint.position.x)) < currentDistance && clamped == YES) { - currentDistance = (abs(point.x - lineChartPoint.position.x)); + currentDistance = (fabs(point.x - lineChartPoint.position.x)); selectedIndex = index; } index++; @@ -968,7 +971,7 @@ - (NSInteger)lineIndexForPoint:(CGPoint)point // Insersection point CGPoint interesectionPoint = CGPointMake(normalizedTouchPoint.x, (lineSlope * (normalizedTouchPoint.x - leftPoint.x)) + leftPoint.y); - CGFloat currentDistance = abs(interesectionPoint.y - normalizedTouchPoint.y); + CGFloat currentDistance = fabs(interesectionPoint.y - normalizedTouchPoint.y); if (currentDistance < shortestDistance) { shortestDistance = currentDistance; diff --git a/JBChartViewDemo/JBChartViewDemo/Controllers/JBBarChartViewController.m b/JBChartViewDemo/JBChartViewDemo/Controllers/JBBarChartViewController.m index ee7a93cd7..c4fe04c59 100644 --- a/JBChartViewDemo/JBChartViewDemo/Controllers/JBBarChartViewController.m +++ b/JBChartViewDemo/JBChartViewDemo/Controllers/JBBarChartViewController.m @@ -85,7 +85,7 @@ - (void)initFakeData NSMutableArray *mutableChartData = [NSMutableArray array]; for (int i=0; i