Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make code ready for ARC

  • Loading branch information...
commit f6f0558c685106b4aa2ea8abcb1332f7184ccc5b 1 parent 8047ac3
@jonreid jonreid authored
View
6 Source/Core/HCAssertThat.m
@@ -30,9 +30,9 @@
@endcode
except we use an NSInvocation so that OCUnit (SenTestingKit) does not have to be linked.
*/
-static NSException *createOCUnitException(const char* fileName, int lineNumber, NSString *description)
+static NSException *createOCUnitException(const char* fileName, int lineNumber, __unsafe_unretained NSString *description)
{
- NSException *result = nil;
+ __unsafe_unretained NSException *result = nil;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
@@ -44,7 +44,7 @@ except we use an NSInvocation so that OCUnit (SenTestingKit) does not have to be
[invocation setTarget:[NSException class]];
[invocation setSelector:selector];
- id fileArg = [NSString stringWithUTF8String:fileName];
+ __unsafe_unretained id fileArg = [NSString stringWithUTF8String:fileName];
[invocation setArgument:&fileArg atIndex:2];
[invocation setArgument:&lineNumber atIndex:3];
[invocation setArgument:&description atIndex:4];
View
2  Source/Core/Helpers/HCInvocationMatcher.m
@@ -50,7 +50,7 @@ - (NSString *)stringFromSelector
- (id)invokeOn:(id)item
{
- id result = nil;
+ __unsafe_unretained id result = nil;
[invocation invokeWithTarget:item];
[invocation getReturnValue:&result];
return result;
View
2  Source/Library/Decorator/HCDescribedAs.m
@@ -17,7 +17,7 @@
typedef struct
{
int first;
- NSString *second;
+ __unsafe_unretained NSString *second;
} HCPairIntNSString;
View
2  Source/Library/Object/HCHasProperty.m
@@ -70,7 +70,7 @@ - (id)objectFromInvokingSelector:(SEL)selector onObject:(id)object
float floatValue;
double doubleValue;
- id result = nil;
+ __unsafe_unretained id result = nil;
const char *argType = [getterSignature methodReturnType];
switch (argType[0])
{
Please sign in to comment.
Something went wrong with that request. Please try again.