kevinzhow

Fix warnnings

@@ -69,7 +69,7 @@ @@ -69,7 +69,7 @@
69 _yValues = yValues; 69 _yValues = yValues;
70 70
71 //make the _yLabelSum value dependant of the distinct values of yValues to avoid duplicates on yAxis 71 //make the _yLabelSum value dependant of the distinct values of yValues to avoid duplicates on yAxis
72 - int yLabelsDifTotal = [NSSet setWithArray:yValues].count; 72 + int yLabelsDifTotal = (int)[NSSet setWithArray:yValues].count;
73 _yLabelSum = yLabelsDifTotal % 2 == 0 ? yLabelsDifTotal : yLabelsDifTotal + 1; 73 _yLabelSum = yLabelsDifTotal % 2 == 0 ? yLabelsDifTotal : yLabelsDifTotal + 1;
74 74
75 if (_yMaxValue) { 75 if (_yMaxValue) {
@@ -138,7 +138,6 @@ @@ -138,7 +138,6 @@
138 for (int index = 0; index < yLabels.count; index++) { 138 for (int index = 0; index < yLabels.count; index++) {
139 labelText = yLabels[index]; 139 labelText = yLabels[index];
140 140
141 -#warning modify origin  
142 NSInteger y = (NSInteger)(_chartCavanHeight - index * yStepHeight); 141 NSInteger y = (NSInteger)(_chartCavanHeight - index * yStepHeight);
143 142
144 PNChartLabel *label = [[PNChartLabel alloc] initWithFrame:CGRectMake(0.0, y, (NSInteger)_chartMargin, (NSInteger)_yLabelHeight)]; 143 PNChartLabel *label = [[PNChartLabel alloc] initWithFrame:CGRectMake(0.0, y, (NSInteger)_chartMargin, (NSInteger)_yLabelHeight)];
@@ -260,7 +259,7 @@ @@ -260,7 +259,7 @@
260 CGPoint p2 = [linePointsArray[i + 1] CGPointValue]; 259 CGPoint p2 = [linePointsArray[i + 1] CGPointValue];
261 260
262 // Closest distance from point to line 261 // Closest distance from point to line
263 - float distance = fabsf(((p2.x - p1.x) * (touchPoint.y - p1.y)) - ((p1.x - touchPoint.x) * (p1.y - p2.y))); 262 + float distance = fabs(((p2.x - p1.x) * (touchPoint.y - p1.y)) - ((p1.x - touchPoint.x) * (p1.y - p2.y)));
264 distance /= hypot(p2.x - p1.x, p1.y - p2.y); 263 distance /= hypot(p2.x - p1.x, p1.y - p2.y);
265 264
266 if (distance <= 5.0) { 265 if (distance <= 5.0) {
@@ -292,7 +291,7 @@ @@ -292,7 +291,7 @@
292 CGPoint p1 = [linePointsArray[i] CGPointValue]; 291 CGPoint p1 = [linePointsArray[i] CGPointValue];
293 CGPoint p2 = [linePointsArray[i + 1] CGPointValue]; 292 CGPoint p2 = [linePointsArray[i + 1] CGPointValue];
294 293
295 - float distanceToP1 = fabsf(hypot(touchPoint.x - p1.x, touchPoint.y - p1.y)); 294 + float distanceToP1 = fabs(hypot(touchPoint.x - p1.x, touchPoint.y - p1.y));
296 float distanceToP2 = hypot(touchPoint.x - p2.x, touchPoint.y - p2.y); 295 float distanceToP2 = hypot(touchPoint.x - p2.x, touchPoint.y - p2.y);
297 296
298 float distance = MIN(distanceToP1, distanceToP2); 297 float distance = MIN(distanceToP1, distanceToP2);