Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(693)

Unified Diff: ios/chrome/common/material_timing.mm

Issue 2689513002: [ObjC ARC] Converts ios/chrome/common:common to ARC. (Closed)
Patch Set: copy Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/common/channel_info.mm ('k') | ios/chrome/common/string_util.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/common/material_timing.mm
diff --git a/ios/chrome/common/material_timing.mm b/ios/chrome/common/material_timing.mm
index d883aacaa46ff99b5e1c58fa23deffce4a1fd2c9..ec125b270675fa55cbc72caf98980902c893a9cb 100644
--- a/ios/chrome/common/material_timing.mm
+++ b/ios/chrome/common/material_timing.mm
@@ -4,6 +4,10 @@
#import "ios/chrome/common/material_timing.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
UIViewAnimationOptions AnimationOptionsForceLinearTiming(
@@ -39,8 +43,10 @@ const CGFloat kDuration7 = 0.4 * kSlowAnimationModifier;
const CGFloat kDuration8 = 0.07 * kSlowAnimationModifier;
CAMediaTimingFunction* TransformCurve2() {
- return [[[CAMediaTimingFunction alloc]
- initWithControlPoints:0.0f :0.84f :0.13f :0.99f] autorelease];
+ return [[CAMediaTimingFunction alloc] initWithControlPoints:
+ 0.0f:
+ 0.84f:
+ 0.13f:0.99f];
pkl (ping after 24h if needed) 2017/02/09 16:46:37 Is this what git-cl-format did? This looks less re
lody 2017/02/09 16:51:50 Yeah, I just tried to make sure and it is git cl f
}
CAMediaTimingFunction* TimingFunction(Curve curve) {
@@ -48,18 +54,24 @@ CAMediaTimingFunction* TimingFunction(Curve curve) {
case CurveEaseInOut:
// This curve is slow both at the begining and end.
// Visualization of curve http://cubic-bezier.com/#.4,0,.2,1
- return [[[CAMediaTimingFunction alloc]
- initWithControlPoints:0.4f :0.0f :0.2f :1.0f] autorelease];
+ return [[CAMediaTimingFunction alloc] initWithControlPoints:
+ 0.4f:
+ 0.0f:
+ 0.2f:1.0f];
case CurveEaseOut:
// This curve is slow at the end.
// Visualization of curve http://cubic-bezier.com/#0,0,.2,1
- return [[[CAMediaTimingFunction alloc]
- initWithControlPoints:0.0f :0.0f :0.2f :1.0f] autorelease];
+ return [[CAMediaTimingFunction alloc] initWithControlPoints:
+ 0.0f:
+ 0.0f:
+ 0.2f:1.0f];
case CurveEaseIn:
// This curve is slow at the begining.
// Visualization of curve http://cubic-bezier.com/#.4,0,1,1
- return [[[CAMediaTimingFunction alloc]
- initWithControlPoints:0.4f :0.0f :1.0f :1.0f] autorelease];
+ return [[CAMediaTimingFunction alloc] initWithControlPoints:
+ 0.4f:
+ 0.0f:
+ 1.0f:1.0f];
case CurveLinear:
// This curve is linear.
return
« no previous file with comments | « ios/chrome/common/channel_info.mm ('k') | ios/chrome/common/string_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698