diff options
author | Joseph Heenan <joseph@emobix.co.uk> | 2016-06-07 16:46:14 +0100 |
---|---|---|
committer | Joseph Heenan <joseph@emobix.co.uk> | 2016-06-09 10:57:47 +0100 |
commit | a3ab5aa8e840ba10f9c259a3e3f07d76f4562428 (patch) | |
tree | fa76a4aa5301d5916efe719ec7fcaec14bcbe993 /platform/ios/Classes/MuInkView.m | |
parent | 641935ed19f95dfb7eab1309905e960389628289 (diff) | |
download | mupdf-a3ab5aa8e840ba10f9c259a3e3f07d76f4562428.tar.xz |
iOS: Run Xcode's "Convert to Modern ObjC" for "ObjC literals"
Uses the more modern/concise syntax that arrived in Xcode 4.4
Diffstat (limited to 'platform/ios/Classes/MuInkView.m')
-rw-r--r-- | platform/ios/Classes/MuInkView.m | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/ios/Classes/MuInkView.m b/platform/ios/Classes/MuInkView.m index 78bc73df..75799941 100644 --- a/platform/ios/Classes/MuInkView.m +++ b/platform/ios/Classes/MuInkView.m @@ -42,7 +42,7 @@ if (rec.state == UIGestureRecognizerStateBegan) [curves addObject:[NSMutableArray array]]; - NSMutableArray *curve = [curves lastObject]; + NSMutableArray *curve = curves.lastObject; [curve addObject:[NSValue valueWithCGPoint:p]]; [self setNeedsDisplay]; @@ -61,14 +61,14 @@ { if (curve.count >= 2) { - CGPoint pt = [[curve objectAtIndex:0] CGPointValue]; + CGPoint pt = [curve[0] CGPointValue]; CGContextBeginPath(cref); CGContextMoveToPoint(cref, pt.x, pt.y); CGPoint lpt = pt; for (int i = 1; i < curve.count; i++) { - pt = [[curve objectAtIndex:i] CGPointValue]; + pt = [curve[i] CGPointValue]; CGContextAddQuadCurveToPoint(cref, lpt.x, lpt.y, (pt.x + lpt.x)/2, (pt.y + lpt.y)/2); lpt = pt; } |