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 when building w/ Xcode 6.3 #154

Merged
merged 1 commit into from
Apr 13, 2015
Merged
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
3 changes: 3 additions & 0 deletions Classes/JBBarChartView.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ - (void)setVerticalSelectionViewVisible:(BOOL)verticalSelectionViewVisible anima

@implementation JBBarChartView

@dynamic dataSource;
@dynamic delegate;

#pragma mark - Alloc/Init

+ (void)initialize
Expand Down
3 changes: 3 additions & 0 deletions Classes/JBChartView.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ - (void)validateHeaderAndFooterHeights;

@implementation JBChartView

@synthesize dataSource;
@synthesize delegate;

#pragma mark - Alloc/Init

- (id)initWithCoder:(NSCoder *)aDecoder
Expand Down
9 changes: 6 additions & 3 deletions Classes/JBLineChartView.m
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ - (void)setVerticalSelectionViewVisible:(BOOL)verticalSelectionViewVisible anima

@implementation JBLineChartView

@dynamic dataSource;
@dynamic delegate;

#pragma mark - Alloc/Init

+ (void)initialize
Expand Down Expand Up @@ -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++;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ - (void)initFakeData
NSMutableArray *mutableChartData = [NSMutableArray array];
for (int i=0; i<kJBBarChartViewControllerNumBars; i++)
{
NSInteger delta = (kJBBarChartViewControllerNumBars - abs((kJBBarChartViewControllerNumBars - i) - i)) + 2;
NSInteger delta = (kJBBarChartViewControllerNumBars - labs((kJBBarChartViewControllerNumBars - i) - i)) + 2;
[mutableChartData addObject:[NSNumber numberWithFloat:MAX((delta * kJBBarChartViewControllerMinBarHeight), arc4random() % (delta * kJBBarChartViewControllerMaxBarHeight))]];

}
Expand Down