From 7e9ba2cf6f42ef7d2e0dca07382b090a78e3c7c3 Mon Sep 17 00:00:00 2001 From: Marius Ursache Date: Mon, 29 Feb 2016 21:39:49 +1100 Subject: Fixed fabs compiler warnings --- Source/SPComboPopupButton.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/SPComboPopupButton.m') diff --git a/Source/SPComboPopupButton.m b/Source/SPComboPopupButton.m index 8c090911..3df3d6ec 100644 --- a/Source/SPComboPopupButton.m +++ b/Source/SPComboPopupButton.m @@ -129,9 +129,9 @@ CGContextSaveGState(context); CGContextSetStrokeColor(context, lineColorParts); - CGContextAddRect(context, CGRectMake(boundingLinePosition - 0.5, boundsRect.origin.y + heightIndent, 1.f, boundsRect.size.height - abs(2 * heightIndent))); + CGContextAddRect(context, CGRectMake(boundingLinePosition - 0.5, boundsRect.origin.y + heightIndent, 1.f, boundsRect.size.height - fabs(2 * heightIndent))); CGContextClip(context); - CGContextDrawLinearGradient(context, lineGradient, CGPointMake(boundingLinePosition - 0.5, boundsRect.origin.y + heightIndent), CGPointMake(boundingLinePosition - 0.5, boundsRect.origin.y + boundsRect.size.height - abs(heightIndent)), 0); + CGContextDrawLinearGradient(context, lineGradient, CGPointMake(boundingLinePosition - 0.5, boundsRect.origin.y + heightIndent), CGPointMake(boundingLinePosition - 0.5, boundsRect.origin.y + boundsRect.size.height - fabs(heightIndent)), 0); CGContextRestoreGState(context); CGGradientRelease(lineGradient); @@ -281,7 +281,7 @@ // Custom tracking to be performed - indent the vertical button area slightly - activeRect = NSMakeRect(cellFrame.origin.x, cellFrame.origin.y + heightIndent, cellFrame.size.width - [(SPComboPopupButton *)controlView lineOffset] + 1, cellFrame.size.height - fabsf(2 * heightIndent)); + activeRect = NSMakeRect(cellFrame.origin.x, cellFrame.origin.y + heightIndent, cellFrame.size.width - [(SPComboPopupButton *)controlView lineOffset] + 1, cellFrame.size.height - fabs(2 * heightIndent)); // Continue tracking the mouse while it's down, updating the state as it enters and leaves the cell, // until it is released; if still within the cell, perform a click. -- cgit v1.2.3