Skip to content

Commit

Permalink
updated targets (all libs, iOS/Mac) to use ARC.
Browse files Browse the repository at this point in the history
  • Loading branch information
rsebbe committed Jul 30, 2014
1 parent 2a45a44 commit 1adedbc
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 102 deletions.
42 changes: 24 additions & 18 deletions CeedGL.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@
052BD76D127ECC3A005A3AE9 /* GLTexture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = GLTexture.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
052BD76F127ECC56005A3AE9 /* GLTexture.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GLTexture.m; sourceTree = "<group>"; };
052BD772127ECEB1005A3AE9 /* GLFramebuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = GLFramebuffer.h; sourceTree = "<group>"; };
0538C9DD154C264000D305EC /* CeedGLDemo.ios.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = CeedGLDemo.ios.entitlements; sourceTree = "<group>"; };
0592DB821286AF810030F780 /* GLPlatform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLPlatform.h; sourceTree = "<group>"; };
0592DBEE1286B2D70030F780 /* CeedGL-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "CeedGL-Info.plist"; path = "Mac/CeedGL-Info.plist"; sourceTree = "<group>"; };
05BE5871128553040054FD91 /* CeedGLDemo.mac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CeedGLDemo.mac.app; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -317,7 +316,6 @@
052BD747127ECB10005A3AE9 = {
isa = PBXGroup;
children = (
0538C9DD154C264000D305EC /* CeedGLDemo.ios.entitlements */,
052BD74E127ECB10005A3AE9 /* Sources */,
050DB8441489179C00812267 /* Mac */,
050DB845148917BC00812267 /* iOS */,
Expand Down Expand Up @@ -817,6 +815,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
Expand All @@ -841,6 +840,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
Expand All @@ -860,6 +860,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD)";
CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
Expand All @@ -884,6 +885,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD)";
CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = iOS/CeedGL_Prefix.pch;
Expand All @@ -902,9 +904,8 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CODE_SIGN_ENTITLEMENTS = CeedGLDemo.ios.entitlements;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
ARCHS = "$(ARCHS_STANDARD)";
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
Expand All @@ -918,6 +919,7 @@
INFOPLIST_FILE = "iOS/CeedGLDemo/CeedGLDemo-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SDKROOT = iphoneos;
WRAPPER_EXTENSION = app;
};
Expand All @@ -927,9 +929,8 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CODE_SIGN_ENTITLEMENTS = CeedGLDemo.ios.entitlements;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
ARCHS = "$(ARCHS_STANDARD)";
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = iOS/CeedGLDemo/CeedGLDemo_Prefix.pch;
Expand All @@ -938,6 +939,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
WRAPPER_EXTENSION = app;
Expand Down Expand Up @@ -982,6 +984,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
Expand All @@ -1001,6 +1004,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD)";
CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = iOS/CeedGL_Prefix.pch;
Expand Down Expand Up @@ -1032,7 +1036,7 @@
GCC_PREFIX_HEADER = Mac/CeedGLDemo/CeedGLDemo_Prefix.pch;
INFOPLIST_FILE = "Mac/CeedGLDemo/CeedGLDemo-Info.plist";
INSTALL_PATH = "$(HOME)/Applications";
MACOSX_DEPLOYMENT_TARGET = 10.6;
MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
Expand All @@ -1042,9 +1046,8 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CODE_SIGN_ENTITLEMENTS = CeedGLDemo.ios.entitlements;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
ARCHS = "$(ARCHS_STANDARD)";
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = iOS/CeedGLDemo/CeedGLDemo_Prefix.pch;
Expand All @@ -1053,6 +1056,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
WRAPPER_EXTENSION = app;
Expand Down Expand Up @@ -1168,6 +1172,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
Expand All @@ -1187,6 +1192,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD)";
CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = iOS/CeedGL_Prefix.pch;
Expand Down Expand Up @@ -1218,7 +1224,7 @@
GCC_PREFIX_HEADER = Mac/CeedGLDemo/CeedGLDemo_Prefix.pch;
INFOPLIST_FILE = "Mac/CeedGLDemo/CeedGLDemo-Info.plist";
INSTALL_PATH = "$(HOME)/Applications";
MACOSX_DEPLOYMENT_TARGET = 10.6;
MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
Expand All @@ -1228,9 +1234,8 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CODE_SIGN_ENTITLEMENTS = CeedGLDemo.ios.entitlements;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
ARCHS = "$(ARCHS_STANDARD)";
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = iOS/CeedGLDemo/CeedGLDemo_Prefix.pch;
Expand All @@ -1239,6 +1244,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
WRAPPER_EXTENSION = app;
Expand All @@ -1262,7 +1268,7 @@
GCC_PREFIX_HEADER = Mac/CeedGLDemo/CeedGLDemo_Prefix.pch;
INFOPLIST_FILE = "Mac/CeedGLDemo/CeedGLDemo-Info.plist";
INSTALL_PATH = "$(HOME)/Applications";
MACOSX_DEPLOYMENT_TARGET = 10.6;
MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
Expand All @@ -1285,7 +1291,7 @@
GCC_PREFIX_HEADER = Mac/CeedGLDemo/CeedGLDemo_Prefix.pch;
INFOPLIST_FILE = "Mac/CeedGLDemo/CeedGLDemo-Info.plist";
INSTALL_PATH = "$(HOME)/Applications";
MACOSX_DEPLOYMENT_TARGET = 10.6;
MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
Expand Down
8 changes: 0 additions & 8 deletions CeedGLDemo.ios.entitlements

This file was deleted.

5 changes: 1 addition & 4 deletions Sources/GLBuffer.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ @implementation GLBuffer

+ (GLBuffer*)buffer
{
return [[[self alloc] init] autorelease];
return [[self alloc] init];
}

- (id)init {
Expand All @@ -28,13 +28,10 @@ - (id)init {

- (void)dealloc {
// Clean-up code here.

if(mHandle && mHandleOwner == nil)
{
GLLog(@"warning: handle not destroyed");
}

[super dealloc];
}

#pragma mark -
Expand Down
12 changes: 2 additions & 10 deletions Sources/GLDrawCommand.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ @implementation GLDrawCommand

+ (GLDrawCommand*)drawCommand
{
return [[[self alloc] init] autorelease];
return [[self alloc] init];
}

- (id)init {
Expand All @@ -35,23 +35,15 @@ - (id)init {
}

- (void)dealloc {
[mTextures release];
[mAttributes release];
[mUniforms release];
[mElementIndexes release];

self.program = nil;

[super dealloc];
}

#pragma mark Indexes
- (void)setElementIndexes:(GLBuffer*)buffer type:(GLenum)type
{
GL_EXCEPT(type != GL_UNSIGNED_BYTE && type != GL_UNSIGNED_SHORT && type != GL_UNSIGNED_INT, NSInvalidArgumentException);

[mElementIndexes autorelease];
mElementIndexes = [buffer retain];
mElementIndexes = buffer;
mElementIndexType = type;
}

Expand Down
9 changes: 1 addition & 8 deletions Sources/GLFramebuffer.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,10 @@ - (id)init {
return self;
}

- (void)dealloc {
// Clean-up code here.

[mAttachments release];

[super dealloc];
}

+ (GLFramebuffer*)framebuffer
{
return [[[self alloc] init] autorelease];
return [[self alloc] init];
}

#pragma mark -
Expand Down
5 changes: 1 addition & 4 deletions Sources/GLObject.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ - (id)init {
- (void)dealloc {
// Clean-up code here.
self.handleOwner = nil;

[super dealloc];
}

- (void)createHandle
Expand All @@ -46,8 +44,7 @@ - (void)setHandleOwner:(id)handleOwner
{
if(handleOwner != mHandleOwner)
{
[mHandleOwner release];
mHandleOwner = [handleOwner retain];
mHandleOwner = handleOwner;
}
}
- (id)handleOwner {
Expand Down
11 changes: 1 addition & 10 deletions Sources/GLProgram.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ @implementation GLProgram

+ (GLProgram*)program
{
return [[[self alloc] init] autorelease];
return [[self alloc] init];
}

- (id)init {
Expand All @@ -27,15 +27,6 @@ - (id)init {
return self;
}

- (void)dealloc {
[mAttachedShaders release];
[mUniformLookup release];
[mAttribLookup release];


[super dealloc];
}

#pragma mark -
#pragma mark Handle creation/destruction
- (void)createHandle
Expand Down
6 changes: 0 additions & 6 deletions Sources/GLRenderbuffer.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ - (id)init {
return self;
}

- (void)dealloc {
// Clean-up code here.

[super dealloc];
}

#pragma mark -
#pragma mark Handle creation/destruction
- (void)createHandle
Expand Down
13 changes: 3 additions & 10 deletions Sources/GLShader.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ - (id)init {

return self;
}
- (void)dealloc {
// Clean-up code here.
[mSource release];

[super dealloc];
}
- (GLShader*)initWithType:(GLenum)type
{
if ((self = [super init])) {
Expand All @@ -45,11 +39,11 @@ - (GLShader*)initFragmentShader

+ (GLShader*)vertexShader
{
return [[[self alloc] initVertexShader] autorelease];
return [[self alloc] initVertexShader];
}
+ (GLShader*)fragmentShader
{
return [[[self alloc] initFragmentShader] autorelease];
return [[self alloc] initFragmentShader];
}


Expand Down Expand Up @@ -83,8 +77,7 @@ - (void)setSource:(NSString*)source

if(mSource != source)
{
[mSource release];
mSource = [source retain];
mSource = source;
}
}
- (BOOL)compile:(NSError**)error
Expand Down
3 changes: 1 addition & 2 deletions Sources/GLTexture.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@ - (void)dealloc {
{
GLLog(@"warning: handle not destroyed");
}
[super dealloc];
}
+ (GLTexture*)texture
{
return [[[self alloc] init] autorelease];
return [[self alloc] init];
}


Expand Down
Loading

0 comments on commit 1adedbc

Please sign in to comment.