Browse files

Changes required to compile with ARC.

  • Loading branch information...
1 parent 0375ac1 commit 4e083924c0e97e42f3b1ecfcfd5dad7e7c484ec4 @ryanjohnston ryanjohnston committed Jan 26, 2013
View
BIN Default-568h@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
8 WTMGlyph.xcodeproj/project.pbxproj
@@ -356,7 +356,7 @@
EA6C92ED136DA457008AD709 /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0420;
+ LastUpgradeCheck = 0450;
ORGANIZATIONNAME = "Warrior Thief Mage Studios";
};
buildConfigurationList = EA6C92F0136DA457008AD709 /* Build configuration list for PBXProject "WTMGlyph" */;
@@ -494,9 +494,11 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
DSTROOT = /tmp/WTMGlyph.dst;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "WTMGlyph/WTMGlyph-Prefix.pch";
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
INSTALL_PATH = /tmp;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -508,9 +510,11 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
DSTROOT = /tmp/WTMGlyph.dst;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "WTMGlyph/WTMGlyph-Prefix.pch";
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
INSTALL_PATH = /tmp;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -528,6 +532,7 @@
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "WTMGlyphTests/WTMGlyphTests-Prefix.pch";
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
INFOPLIST_FILE = "WTMGlyphTests/WTMGlyphTests-Info.plist";
OTHER_LDFLAGS = (
"-framework",
@@ -548,6 +553,7 @@
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "WTMGlyphTests/WTMGlyphTests-Prefix.pch";
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
INFOPLIST_FILE = "WTMGlyphTests/WTMGlyphTests-Info.plist";
OTHER_LDFLAGS = (
"-framework",
View
2 WTMGlyph/CDataScanner.h
@@ -40,7 +40,7 @@
NSUInteger length;
}
-@property (readwrite, nonatomic, retain) NSData *data;
+@property (readwrite, nonatomic, strong) NSData *data;
@property (readwrite, nonatomic, assign) NSUInteger scanLocation;
@property (readonly, nonatomic, assign) NSUInteger bytesRemaining;
@property (readonly, nonatomic, assign) BOOL isAtEnd;
View
15 WTMGlyph/CDataScanner.m
@@ -74,16 +74,14 @@ + (void)initialize
{
if (sDoubleCharacters == NULL)
{
- sDoubleCharacters = [[NSCharacterSet characterSetWithCharactersInString:@"0123456789eE-+."] retain];
+ sDoubleCharacters = [NSCharacterSet characterSetWithCharactersInString:@"0123456789eE-+."];
}
}
- (void)dealloc
{
- [data release];
data = NULL;
//
- [super dealloc];
}
- (NSUInteger)scanLocation
@@ -105,8 +103,7 @@ - (void)setData:(NSData *)inData
{
if (data != inData)
{
- [data release];
- data = [inData retain];
+ data = inData;
}
if (data)
@@ -202,7 +199,7 @@ - (BOOL)scanCharactersFromSet:(NSCharacterSet *)inSet intoString:(NSString **)ou
if (outValue)
{
- *outValue = [[[NSString alloc] initWithBytes:current length:P - current encoding:NSUTF8StringEncoding] autorelease];
+ *outValue = [[NSString alloc] initWithBytes:current length:P - current encoding:NSUTF8StringEncoding];
}
current = P;
@@ -221,7 +218,7 @@ - (BOOL)scanUpToString:(NSString *)inString intoString:(NSString **)outValue
if (outValue)
{
- *outValue = [[[NSString alloc] initWithBytes:current length:theResult - (char *)current encoding:NSUTF8StringEncoding] autorelease];
+ *outValue = [[NSString alloc] initWithBytes:current length:theResult - (char *)current encoding:NSUTF8StringEncoding];
}
current = (u_int8_t *)theResult;
@@ -242,7 +239,7 @@ - (BOOL)scanUpToCharactersFromSet:(NSCharacterSet *)inSet intoString:(NSString *
if (outValue)
{
- *outValue = [[[NSString alloc] initWithBytes:current length:P - current encoding:NSUTF8StringEncoding] autorelease];
+ *outValue = [[NSString alloc] initWithBytes:current length:P - current encoding:NSUTF8StringEncoding];
}
current = P;
@@ -327,7 +324,7 @@ - (void)skipWhitespace
- (NSString *)remainingString
{
NSData *theRemainingData = [NSData dataWithBytes:current length:end - current];
- NSString *theString = [[[NSString alloc] initWithData:theRemainingData encoding:NSUTF8StringEncoding] autorelease];
+ NSString *theString = [[NSString alloc] initWithData:theRemainingData encoding:NSUTF8StringEncoding];
return(theString);
}
View
4 WTMGlyph/Experimental/CFilteringJSONSerializer.h
@@ -16,8 +16,8 @@ typedef id (^JSONConversionConverter)(id inObject); // TODO replace with value t
NSDictionary *convertersByName;
}
-@property (readwrite, nonatomic, retain) NSSet *tests;
-@property (readwrite, nonatomic, retain) NSDictionary *convertersByName;
+@property (readwrite, nonatomic, strong) NSSet *tests;
+@property (readwrite, nonatomic, strong) NSDictionary *convertersByName;
- (void)addTest:(JSONConversionTest)inTest;
- (void)addConverter:(JSONConversionConverter)inConverter forName:(NSString *)inName;
View
16 WTMGlyph/Experimental/CFilteringJSONSerializer.m
@@ -13,16 +13,6 @@ @implementation CFilteringJSONSerializer
@synthesize tests;
@synthesize convertersByName;
-- (void)dealloc
- {
- [tests release];
- tests = NULL;
- //
- [convertersByName release];
- convertersByName = NULL;
- //
- [super dealloc];
- }
- (NSData *)serializeObject:(id)inObject error:(NSError **)outError
{
@@ -69,16 +59,16 @@ - (NSData *)serializeObject:(id)inObject error:(NSError **)outError
- (void)addTest:(JSONConversionTest)inTest
{
- inTest = [[inTest copy] autorelease];
+ inTest = [inTest copy];
NSSet *theTests = [self.tests setByAddingObject:inTest];
self.tests = theTests;
}
- (void)addConverter:(JSONConversionConverter)inConverter forName:(NSString *)inName
{
- NSMutableDictionary *theConvertersByName = [[self.convertersByName mutableCopy] autorelease];
+ NSMutableDictionary *theConvertersByName = [self.convertersByName mutableCopy];
- inConverter = [[inConverter copy] autorelease];
+ inConverter = [inConverter copy];
[theConvertersByName setObject:inConverter forKey:inName];
self.convertersByName = theConvertersByName;
}
View
2 WTMGlyph/Experimental/CJSONSerializedData.h
@@ -18,7 +18,7 @@
NSData *data;
}
-@property (readonly, nonatomic, retain) NSData *data;
+@property (readonly, nonatomic, strong) NSData *data;
- (id)initWithData:(NSData *)inData;
View
9 WTMGlyph/Experimental/CJSONSerializedData.m
@@ -21,18 +21,11 @@ - (id)initWithData:(NSData *)inData
{
if ((self = [super init]) != NULL)
{
- data = [inData retain];
+ data = inData;
}
return(self);
}
-- (void)dealloc
- {
- [data release];
- data = NULL;
- //
- [super dealloc];
- }
- (NSData *)serializedJSONData
{
View
4 WTMGlyph/Extensions/CDataScanner_Extensions.m
@@ -119,8 +119,8 @@ - (NSDictionary *)userInfoForScanLocation
NSString *theSnippet = [NSString stringWithFormat:@"%@!HERE>!%@",
- [[[NSString alloc] initWithData:[self.data subdataWithRange:theStartRange] encoding:NSUTF8StringEncoding] autorelease],
- [[[NSString alloc] initWithData:[self.data subdataWithRange:theEndRange] encoding:NSUTF8StringEncoding] autorelease]
+ [[NSString alloc] initWithData:[self.data subdataWithRange:theStartRange] encoding:NSUTF8StringEncoding],
+ [[NSString alloc] initWithData:[self.data subdataWithRange:theEndRange] encoding:NSUTF8StringEncoding]
];
NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys:
View
4 WTMGlyph/JSON/CJSONDeserializer.h
@@ -46,9 +46,9 @@ typedef NSUInteger EJSONDeserializationOptions;
EJSONDeserializationOptions options;
}
-@property (readwrite, nonatomic, retain) CJSONScanner *scanner;
+@property (readwrite, nonatomic, strong) CJSONScanner *scanner;
/// Object to return instead when a null encountered in the JSON. Defaults to NSNull. Setting to null causes the scanner to skip null values.
-@property (readwrite, nonatomic, retain) id nullObject;
+@property (readwrite, nonatomic, strong) id nullObject;
/// JSON must be encoded in Unicode (UTF-8, UTF-16 or UTF-32). Use this if you expect to get the JSON in another encoding.
@property (readwrite, nonatomic, assign) NSStringEncoding allowedEncoding;
@property (readwrite, nonatomic, assign) EJSONDeserializationOptions options;
View
9 WTMGlyph/JSON/CJSONDeserializer.m
@@ -44,7 +44,7 @@ @implementation CJSONDeserializer
+ (CJSONDeserializer *)deserializer
{
- return([[[self alloc] init] autorelease]);
+ return([[self alloc] init]);
}
- (id)init
@@ -55,13 +55,6 @@ - (id)init
return(self);
}
-- (void)dealloc
- {
- [scanner release];
- scanner = NULL;
- //
- [super dealloc];
- }
#pragma mark -
View
2 WTMGlyph/JSON/CJSONScanner.h
@@ -44,7 +44,7 @@ typedef NSUInteger EJSONScannerOptions;
}
@property (readwrite, nonatomic, assign) BOOL strictEscapeCodes;
-@property (readwrite, nonatomic, retain) id nullObject;
+@property (readwrite, nonatomic, strong) id nullObject;
@property (readwrite, nonatomic, assign) NSStringEncoding allowedEncoding;
@property (readwrite, nonatomic, assign) EJSONScannerOptions options;
View
43 WTMGlyph/JSON/CJSONScanner.m
@@ -64,18 +64,11 @@ - (id)init
if ((self = [super init]) != NULL)
{
strictEscapeCodes = NO;
- nullObject = [[NSNull null] retain];
+ nullObject = [NSNull null];
}
return(self);
}
-- (void)dealloc
- {
- [nullObject release];
- nullObject = NULL;
- //
- [super dealloc];
- }
#pragma mark -
@@ -108,7 +101,6 @@ - (BOOL)setData:(NSData *)inData error:(NSError **)outError;
theString = [[NSString alloc] initWithData:theData encoding:self.allowedEncoding];
}
theData = [theString dataUsingEncoding:NSUTF8StringEncoding];
- [theString release];
}
if (theData)
@@ -248,7 +240,6 @@ - (BOOL)scanJSONDictionary:(NSDictionary **)outDictionary error:(NSError **)outE
[theUserInfo addEntriesFromDictionary:self.userInfoForScanLocation];
*outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:kJSONScannerErrorCode_DictionaryKeyScanFailed userInfo:theUserInfo];
}
- [theDictionary release];
return(NO);
}
@@ -265,7 +256,6 @@ - (BOOL)scanJSONDictionary:(NSDictionary **)outDictionary error:(NSError **)outE
[theUserInfo addEntriesFromDictionary:self.userInfoForScanLocation];
*outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:kJSONScannerErrorCode_DictionaryKeyNotTerminated userInfo:theUserInfo];
}
- [theDictionary release];
return(NO);
}
@@ -282,7 +272,6 @@ - (BOOL)scanJSONDictionary:(NSDictionary **)outDictionary error:(NSError **)outE
[theUserInfo addEntriesFromDictionary:self.userInfoForScanLocation];
*outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:kJSONScannerErrorCode_DictionaryValueScanFailed userInfo:theUserInfo];
}
- [theDictionary release];
return(NO);
}
@@ -309,7 +298,6 @@ - (BOOL)scanJSONDictionary:(NSDictionary **)outDictionary error:(NSError **)outE
[theUserInfo addEntriesFromDictionary:self.userInfoForScanLocation];
*outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:kJSONScannerErrorCode_DictionaryKeyValuePairNoDelimiter userInfo:theUserInfo];
}
- [theDictionary release];
return(NO);
}
break;
@@ -333,25 +321,22 @@ - (BOOL)scanJSONDictionary:(NSDictionary **)outDictionary error:(NSError **)outE
[theUserInfo addEntriesFromDictionary:self.userInfoForScanLocation];
*outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:kJSONScannerErrorCode_DictionaryNotTerminated userInfo:theUserInfo];
}
- [theDictionary release];
return(NO);
}
if (outDictionary != NULL)
{
if (self.options & kJSONScannerOptions_MutableContainers)
{
- *outDictionary = [theDictionary autorelease];
+ *outDictionary = theDictionary;
}
else
{
- *outDictionary = [[theDictionary copy] autorelease];
- [theDictionary release];
+ *outDictionary = [theDictionary copy];
}
}
else
{
- [theDictionary release];
}
return(YES);
@@ -393,7 +378,6 @@ - (BOOL)scanJSONArray:(NSArray **)outArray error:(NSError **)outError
[theUserInfo addEntriesFromDictionary:self.userInfoForScanLocation];
*outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:kJSONScannerErrorCode_ArrayValueScanFailed userInfo:theUserInfo];
}
- [theArray release];
return(NO);
}
@@ -409,7 +393,6 @@ - (BOOL)scanJSONArray:(NSArray **)outArray error:(NSError **)outError
[theUserInfo addEntriesFromDictionary:self.userInfoForScanLocation];
*outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:kJSONScannerErrorCode_ArrayValueIsNull userInfo:theUserInfo];
}
- [theArray release];
return(NO);
}
}
@@ -433,7 +416,6 @@ - (BOOL)scanJSONArray:(NSArray **)outArray error:(NSError **)outError
[theUserInfo addEntriesFromDictionary:self.userInfoForScanLocation];
*outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:kJSONScannerErrorCode_ArrayNotTerminated userInfo:theUserInfo];
}
- [theArray release];
return(NO);
}
@@ -455,25 +437,22 @@ - (BOOL)scanJSONArray:(NSArray **)outArray error:(NSError **)outError
[theUserInfo addEntriesFromDictionary:self.userInfoForScanLocation];
*outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:kJSONScannerErrorCode_ArrayNotTerminated userInfo:theUserInfo];
}
- [theArray release];
return(NO);
}
if (outArray != NULL)
{
if (self.options & kJSONScannerOptions_MutableContainers)
{
- *outArray = [theArray autorelease];
+ *outArray = theArray;
}
else
{
- *outArray = [[theArray copy] autorelease];
- [theArray release];
+ *outArray = [theArray copy];
}
}
else
{
- [theArray release];
}
return(YES);
}
@@ -497,7 +476,6 @@ - (BOOL)scanJSONStringConstant:(NSString **)outStringConstant error:(NSError **)
[theUserInfo addEntriesFromDictionary:self.userInfoForScanLocation];
*outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:kJSONScannerErrorCode_StringNotStartedWithBackslash userInfo:theUserInfo];
}
- [theString release];
return(NO);
}
@@ -551,7 +529,6 @@ - (BOOL)scanJSONStringConstant:(NSString **)outStringConstant error:(NSError **)
[theUserInfo addEntriesFromDictionary:self.userInfoForScanLocation];
*outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:kJSONScannerErrorCode_StringUnicodeNotDecoded userInfo:theUserInfo];
}
- [theString release];
return(NO);
}
theCharacter |= (theDigit << theShift);
@@ -571,7 +548,6 @@ - (BOOL)scanJSONStringConstant:(NSString **)outStringConstant error:(NSError **)
[theUserInfo addEntriesFromDictionary:self.userInfoForScanLocation];
*outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:kJSONScannerErrorCode_StringUnknownEscapeCode userInfo:theUserInfo];
}
- [theString release];
return(NO);
}
}
@@ -589,7 +565,6 @@ - (BOOL)scanJSONStringConstant:(NSString **)outStringConstant error:(NSError **)
[theUserInfo addEntriesFromDictionary:self.userInfoForScanLocation];
*outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:kJSONScannerErrorCode_StringNotTerminated userInfo:theUserInfo];
}
- [theString release];
return(NO);
}
}
@@ -598,17 +573,15 @@ - (BOOL)scanJSONStringConstant:(NSString **)outStringConstant error:(NSError **)
{
if (self.options & kJSONScannerOptions_MutableLeaves)
{
- *outStringConstant = [theString autorelease];
+ *outStringConstant = theString;
}
else
{
- *outStringConstant = [[theString copy] autorelease];
- [theString release];
+ *outStringConstant = [theString copy];
}
}
else
{
- [theString release];
}
return(YES);
@@ -665,7 +638,7 @@ - (BOOL)scanNotQuoteCharactersIntoString:(NSString **)outValue
if (outValue)
{
- *outValue = [[[NSString alloc] initWithBytes:current length:P - current encoding:NSUTF8StringEncoding] autorelease];
+ *outValue = [[NSString alloc] initWithBytes:current length:P - current encoding:NSUTF8StringEncoding];
}
current = P;
View
8 WTMGlyph/JSON/CJSONSerializer.m
@@ -39,8 +39,6 @@ @implementation CJSONSerializer
+ (void)initialize
{
- NSAutoreleasePool *thePool = [[NSAutoreleasePool alloc] init];
-
if (self == [CJSONSerializer class])
{
if (kNULL == NULL)
@@ -49,14 +47,12 @@ + (void)initialize
kFalse = [[NSData alloc] initWithBytesNoCopy:(void *)"false" length:5 freeWhenDone:NO];
if (kTrue == NULL)
kTrue = [[NSData alloc] initWithBytesNoCopy:(void *)"true" length:4 freeWhenDone:NO];
-
- [thePool release];
}
}
+ (CJSONSerializer *)serializer
{
- return([[[self alloc] init] autorelease]);
+ return([[self alloc] init]);
}
- (BOOL)isValidJSONObject:(id)inObject
@@ -121,7 +117,7 @@ - (NSData *)serializeObject:(id)inObject error:(NSError **)outError
}
else if ([inObject isKindOfClass:[NSData class]])
{
- NSString *theString = [[[NSString alloc] initWithData:inObject encoding:NSUTF8StringEncoding] autorelease];
+ NSString *theString = [[NSString alloc] initWithData:inObject encoding:NSUTF8StringEncoding];
theResult = [self serializeString:theString error:outError];
}
else if ([inObject respondsToSelector:@selector(JSONDataRepresentation)])
View
6 WTMGlyph/WTMGlyph.h
@@ -21,9 +21,9 @@
WTMGlyphStroke *currentStroke;
}
-@property (nonatomic, retain) NSString *name;
-@property (nonatomic, retain) NSMutableArray *strokes;
-@property (nonatomic, retain) NSMutableArray *templates;
+@property (nonatomic, strong) NSString *name;
+@property (nonatomic, strong) NSMutableArray *strokes;
+@property (nonatomic, strong) NSMutableArray *templates;
- (id)init;
- (id)initWithName:(NSString *)_name strokes:(NSArray *)strokes;
View
14 WTMGlyph/WTMGlyph.m
@@ -20,16 +20,6 @@ @implementation WTMGlyph
#pragma mark - Lifecycle
-- (void)dealloc {
- [name release];
- [strokes release];
- [strokeOrders release];
- [permutedStrokeOrders release];
- [unistrokes release];
- [templates release];
-
- [super dealloc];
-}
- (id)init {
if ((self = [super init])) {
@@ -43,14 +33,14 @@ - (id)init {
}
- (id)initWithName:(NSString *)_name strokes:(NSMutableArray *)_strokes {
- [self init];
+ if (!(self = [self init])) return nil;
self.name = _name;
[self createTemplates];
return self;
}
- (id)initWithName:(NSString *)_name JSONData:(NSData *)jsonData {
- [self init];
+ if (!(self = [self init])) return nil;
self.name = _name;
[self createTemplatesFromJSONData:jsonData];
return self;
View
8 WTMGlyph/WTMGlyphDetector.h
@@ -13,7 +13,7 @@
@interface WTMGlyphDetector : NSObject {
- id<WTMGlyphDelegate> delegate;
+ id<WTMGlyphDelegate> __unsafe_unretained delegate;
NSMutableArray *points;
NSMutableArray *glyphs;
@@ -23,9 +23,9 @@
}
-@property (nonatomic, assign) id delegate;
-@property (nonatomic, assign) NSMutableArray *points;
-@property (nonatomic, assign) NSMutableArray *glyphs;
+@property (nonatomic, unsafe_unretained) id delegate;
+@property (nonatomic, strong) NSMutableArray *points;
+@property (nonatomic, strong) NSMutableArray *glyphs;
@property (nonatomic, assign) NSInteger timeoutSeconds;
+ (id)detector;
View
12 WTMGlyph/WTMGlyphDetector.m
@@ -41,13 +41,13 @@ - (id)init {
}
- (id)initWithGlyphs:(NSArray *)_glyphs {
- [self init];
+ if (!(self = [self init])) return nil;
self.glyphs = [NSMutableArray arrayWithArray:_glyphs];
return self;
}
- (id)initWithDefaultGlyphs {
- [self init];
+ if (!(self = [self init])) return nil;
NSData *jsonData;
NSArray *fileNames = [NSArray arrayWithObjects: @"D", @"T", @"N", @"P", nil];
@@ -63,12 +63,6 @@ - (id)initWithDefaultGlyphs {
return self;
}
-- (void)dealloc {
- [points release];
- [glyphs release];
-
- [super dealloc];
-}
#pragma mark - Glyph Templates
@@ -152,7 +146,7 @@ - (void)detectGlyph {
}
DebugLog(@"Best Glyph: %@ with a Score of: %f", bestMatch.name, highestScore);
- NSSortDescriptor *sortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"score" ascending:NO] autorelease];
+ NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"score" ascending:NO];
NSArray *sortedResults = [results sortedArrayUsingDescriptors:[NSArray arrayWithObjects:sortDescriptor, nil]];
[delegate glyphDetected:bestMatch withScore:highestScore];
View
2 WTMGlyph/WTMGlyphStroke.h
@@ -13,7 +13,7 @@
NSMutableArray *points;
}
-@property (nonatomic, retain) NSMutableArray *points;
+@property (nonatomic, strong) NSMutableArray *points;
- (id)initWithPoints:(NSArray *)_points;
- (void)addPoint:(CGPoint)point;
View
5 WTMGlyph/WTMGlyphStroke.m
@@ -12,11 +12,6 @@
@implementation WTMGlyphStroke
@synthesize points;
-- (void)dealloc {
- [points release];
-
- [super dealloc];
-}
- (id)initWithPoints:(NSArray *)_points {
if ((self = [super init])) {
View
8 WTMGlyph/WTMGlyphTemplate.h
@@ -17,10 +17,10 @@
NSMutableArray *vector;
}
-@property (nonatomic, retain) NSString *name;
-@property (nonatomic, retain) NSMutableArray *points;
-@property (nonatomic, retain) NSMutableArray *normalizedPoints;
-@property (nonatomic, retain) NSMutableArray *vector;
+@property (nonatomic, strong) NSString *name;
+@property (nonatomic, strong) NSMutableArray *points;
+@property (nonatomic, strong) NSMutableArray *normalizedPoints;
+@property (nonatomic, strong) NSMutableArray *vector;
- (id)initWithName:(NSString *)_name points:(NSArray *)_points;
- (void)normalize;
View
8 WTMGlyph/WTMGlyphTemplate.m
@@ -19,14 +19,6 @@ @implementation WTMGlyphTemplate
@synthesize normalizedPoints;
@synthesize vector;
-- (void)dealloc {
- [name release];
- [points release];
- [normalizedPoints release];
- [vector release];
-
- [super dealloc];
-}
- (id)initWithName:(NSString *)_name points:(NSArray *)_points {
if ((self = [super init])) {
View
4 WTMGlyphDemo.xcodeproj/project.pbxproj
@@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
+ 0448FFC916B4F48700E21FD8 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 0448FFC816B4F48700E21FD8 /* Default-568h@2x.png */; };
4249137A15A5422B001F58DD /* WTMGlyphDetectorView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4249137915A5422B001F58DD /* WTMGlyphDetectorView.m */; };
4249138615A5544E001F58DD /* circle.json in Resources */ = {isa = PBXBuildFile; fileRef = 4249138015A5544E001F58DD /* circle.json */; };
4249138815A5544E001F58DD /* square.json in Resources */ = {isa = PBXBuildFile; fileRef = 4249138215A5544E001F58DD /* square.json */; };
@@ -45,6 +46,7 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
+ 0448FFC816B4F48700E21FD8 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
4249137815A5422B001F58DD /* WTMGlyphDetectorView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WTMGlyphDetectorView.h; sourceTree = "<group>"; };
4249137915A5422B001F58DD /* WTMGlyphDetectorView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WTMGlyphDetectorView.m; sourceTree = "<group>"; };
4249138015A5544E001F58DD /* circle.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = circle.json; sourceTree = "<group>"; };
@@ -136,6 +138,7 @@
42E359C415A536C000C9A3F3 = {
isa = PBXGroup;
children = (
+ 0448FFC816B4F48700E21FD8 /* Default-568h@2x.png */,
42E359FA15A5372500C9A3F3 /* WTMGlyph */,
42E359D915A536C000C9A3F3 /* WTMGlyphDemo */,
42E359D215A536C000C9A3F3 /* Frameworks */,
@@ -322,6 +325,7 @@
4249138915A5544E001F58DD /* triangle.json in Resources */,
4249138A15A5544E001F58DD /* V.json in Resources */,
4249138B15A5544E001F58DD /* W.json in Resources */,
+ 0448FFC916B4F48700E21FD8 /* Default-568h@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

0 comments on commit 4e08392

Please sign in to comment.