Minor objective-c code style improvements
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
diff --git a/src/video/uikit/SDL_uikitappdelegate.m b/src/video/uikit/SDL_uikitappdelegate.m
index fe308b2..6a07d5d 100644
--- a/src/video/uikit/SDL_uikitappdelegate.m
+++ b/src/video/uikit/SDL_uikitappdelegate.m
@@ -113,7 +113,7 @@ SDL_IdleTimerDisabledChanged(void *userdata, const char *name, const char *oldVa
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
/* Set working directory to resource path */
- [[NSFileManager defaultManager] changeCurrentDirectoryPath: [[NSBundle mainBundle] resourcePath]];
+ [[NSFileManager defaultManager] changeCurrentDirectoryPath:[[NSBundle mainBundle] resourcePath]];
/* register a callback for the idletimer hint */
SDL_AddHintCallback(SDL_HINT_IDLE_TIMER_DISABLED,
diff --git a/src/video/uikit/SDL_uikitopengles.m b/src/video/uikit/SDL_uikitopengles.m
index cb9beaa..82c1e30 100644
--- a/src/video/uikit/SDL_uikitopengles.m
+++ b/src/video/uikit/SDL_uikitopengles.m
@@ -141,18 +141,18 @@ UIKit_GL_CreateContext(_THIS, SDL_Window * window)
}
/* construct our view, passing in SDL's OpenGL configuration data */
- view = [[SDL_uikitopenglview alloc] initWithFrame: frame
- scale: scale
- retainBacking: _this->gl_config.retained_backing
- rBits: _this->gl_config.red_size
- gBits: _this->gl_config.green_size
- bBits: _this->gl_config.blue_size
- aBits: _this->gl_config.alpha_size
- depthBits: _this->gl_config.depth_size
- stencilBits: _this->gl_config.stencil_size
- sRGB: _this->gl_config.framebuffer_srgb_capable
- majorVersion: _this->gl_config.major_version
- shareGroup: share_group];
+ view = [[SDL_uikitopenglview alloc] initWithFrame:frame
+ scale:scale
+ retainBacking:_this->gl_config.retained_backing
+ rBits:_this->gl_config.red_size
+ gBits:_this->gl_config.green_size
+ bBits:_this->gl_config.blue_size
+ aBits:_this->gl_config.alpha_size
+ depthBits:_this->gl_config.depth_size
+ stencilBits:_this->gl_config.stencil_size
+ sRGB:_this->gl_config.framebuffer_srgb_capable
+ majorVersion:_this->gl_config.major_version
+ shareGroup:share_group];
if (!view) {
return NULL;
}
@@ -162,7 +162,7 @@ UIKit_GL_CreateContext(_THIS, SDL_Window * window)
if (view.viewcontroller != nil) {
view.viewcontroller.view = view;
}
- [uiwindow addSubview: view];
+ [uiwindow addSubview:view];
/* The view controller needs to be the root in order to control rotation on iOS 6.0 */
if (uiwindow.rootViewController == nil) {
diff --git a/src/video/uikit/SDL_uikitopenglview.m b/src/video/uikit/SDL_uikitopenglview.m
index 3ffd45f..5da30c3 100644
--- a/src/video/uikit/SDL_uikitopenglview.m
+++ b/src/video/uikit/SDL_uikitopenglview.m
@@ -112,8 +112,8 @@
eaglLayer.opaque = YES;
eaglLayer.drawableProperties = @{
- kEAGLDrawablePropertyRetainedBacking: @(retained),
- kEAGLDrawablePropertyColorFormat: colorFormat
+ kEAGLDrawablePropertyRetainedBacking:@(retained),
+ kEAGLDrawablePropertyColorFormat:colorFormat
};
/* Set the appropriate scale (for retina display support) */
diff --git a/src/video/uikit/SDL_uikitview.m b/src/video/uikit/SDL_uikitview.m
index b5ba73b..2cb07ca 100644
--- a/src/video/uikit/SDL_uikitview.m
+++ b/src/video/uikit/SDL_uikitview.m
@@ -52,7 +52,7 @@ void _uikit_keyboard_init();
- (id)initWithFrame:(CGRect)frame
{
- if (self = [super initWithFrame: frame]) {
+ if (self = [super initWithFrame:frame]) {
#if SDL_IPHONE_KEYBOARD
[self initializeKeyboard];
#endif
@@ -69,7 +69,7 @@ void _uikit_keyboard_init();
- (CGPoint)touchLocation:(UITouch *)touch shouldNormalize:(BOOL)normalize
{
- CGPoint point = [touch locationInView: self];
+ CGPoint point = [touch locationInView:self];
if (normalize) {
CGRect bounds = self.bounds;
@@ -123,7 +123,7 @@ void _uikit_keyboard_init();
at once, or perhaps in other circumstances. Usually (it seems)
all active touches are canceled.
*/
- [self touchesEnded: touches withEvent: event];
+ [self touchesEnded:touches withEvent:event];
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
@@ -154,7 +154,7 @@ void _uikit_keyboard_init();
/* Set ourselves up as a UITextFieldDelegate */
- (void)initializeKeyboard
{
- textField = [[UITextField alloc] initWithFrame: CGRectZero];
+ textField = [[UITextField alloc] initWithFrame:CGRectZero];
textField.delegate = self;
/* placeholder so there is something to delete! */
textField.text = @" ";
@@ -171,7 +171,7 @@ void _uikit_keyboard_init();
textField.hidden = YES;
keyboardVisible = NO;
/* add the UITextField (hidden) to our view */
- [self addSubview: textField];
+ [self addSubview:textField];
_uikit_keyboard_init();
}
@@ -204,7 +204,7 @@ void _uikit_keyboard_init();
int i;
for (i = 0; i < [string length]; i++) {
- unichar c = [string characterAtIndex: i];
+ unichar c = [string characterAtIndex:i];
Uint16 mod = 0;
SDL_Scancode code;