From 40df1c8c3fab26f74ae05f62e65e70c318214940 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Fri, 6 Jul 2018 14:56:03 -0600 Subject: [PATCH] CR: simplify --- .../ConversationView/Cells/OWSBubbleView.m | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/Signal/src/ViewControllers/ConversationView/Cells/OWSBubbleView.m b/Signal/src/ViewControllers/ConversationView/Cells/OWSBubbleView.m index 178dae83e..2a36a6a78 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/OWSBubbleView.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/OWSBubbleView.m @@ -161,16 +161,13 @@ const CGFloat kOWSMessageCellCornerRadius_Small = 2; CGFloat bottomRounding = (useSmallCorners_Bottom ? kOWSMessageCellCornerRadius_Small : kOWSMessageCellCornerRadius_Large); - const CGFloat topAngle = 3.0f * M_PI / 2.0f; + const CGFloat topAngle = 3.0f * M_PI_2; const CGFloat rightAngle = 0.0f; - const CGFloat bottomAngle = M_PI / 2.0f; + const CGFloat bottomAngle = M_PI_2; const CGFloat leftAngle = M_PI; [bezierPath moveToPoint:CGPointMake(bubbleLeft + topRounding, bubbleTop)]; - // top line - [bezierPath addLineToPoint:CGPointMake(bubbleRight - topRounding, bubbleTop)]; - // top right corner [bezierPath addArcWithCenter:CGPointMake(bubbleRight - topRounding, bubbleTop + topRounding) radius:topRounding @@ -178,9 +175,6 @@ const CGFloat kOWSMessageCellCornerRadius_Small = 2; endAngle:rightAngle clockwise:true]; - // right line - [bezierPath addLineToPoint:CGPointMake(bubbleRight, bubbleBottom - bottomRounding)]; - // bottom right corner [bezierPath addArcWithCenter:CGPointMake(bubbleRight - bottomRounding, bubbleBottom - bottomRounding) radius:bottomRounding @@ -188,9 +182,6 @@ const CGFloat kOWSMessageCellCornerRadius_Small = 2; endAngle:bottomAngle clockwise:true]; - // bottom line - [bezierPath addLineToPoint:CGPointMake(bubbleLeft + bottomRounding, bubbleBottom)]; - // bottom left corner [bezierPath addArcWithCenter:CGPointMake(bubbleLeft + bottomRounding, bubbleBottom - bottomRounding) radius:bottomRounding @@ -198,9 +189,6 @@ const CGFloat kOWSMessageCellCornerRadius_Small = 2; endAngle:leftAngle clockwise:true]; - // left line - [bezierPath addLineToPoint:CGPointMake(bubbleLeft, bubbleTop + topRounding)]; - // top left corner [bezierPath addArcWithCenter:CGPointMake(bubbleLeft + topRounding, bubbleTop + topRounding) radius:topRounding