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

Unified Diff: ios/testing/ocmock_complex_type_helper.mm

Issue 2516673002: [ObjC ARC] Converts ios/testing:ocmock_support to ARC.Automatically generated ARCMigrate commitN… (Closed)
Patch Set: Created 4 years, 1 month 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/testing/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/testing/ocmock_complex_type_helper.mm
diff --git a/ios/testing/ocmock_complex_type_helper.mm b/ios/testing/ocmock_complex_type_helper.mm
index bc89a887d2515b926f72c83fd20f76b07b74b817..441e2b1f517f1d140ec36c8d210af5183a5f3310 100644
--- a/ios/testing/ocmock_complex_type_helper.mm
+++ b/ios/testing/ocmock_complex_type_helper.mm
@@ -7,6 +7,10 @@
#include "base/logging.h"
#include "base/mac/scoped_nsobject.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
@implementation OCMockComplexTypeHelper {
// Same as the superclass -representedObject, but retained.
base::scoped_nsobject<OCMockObject> _object;
@@ -18,7 +22,7 @@
- (instancetype)initWithRepresentedObject:(id)object {
if ((self = [super initWithRepresentedObject:object]))
- _object.reset([object retain]);
+ _object.reset(object);
return self;
}
« no previous file with comments | « ios/testing/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698