]> git.sesse.net Git - vlc/commitdiff
* some minor fixes (signed vs unsigned ints, removed an always ignored pragma, fixed...
authorFelix Paul Kühne <fkuehne@videolan.org>
Thu, 20 Jul 2006 19:45:51 +0000 (19:45 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Thu, 20 Jul 2006 19:45:51 +0000 (19:45 +0000)
modules/gui/macosx/AppleRemote.m

index 364a2f08002db1c27b41e73a4a9e6dcd86ae9967..e588d4c06f4a7e784c2d5d582a12b616e791d31a 100644 (file)
@@ -13,10 +13,8 @@ const int REMOTE_SWITCH_COOKIE=19;
 
 @implementation AppleRemote
 
-#pragma public interface
-
 - (id) init {  
-       if ( self = [super init] ) {
+       if ( self == [super init] ) {
                openInExclusiveMode = YES;
                queue = NULL;
                hidDeviceInterface = NULL;
@@ -154,7 +152,7 @@ static AppleRemote* sharedInstance=nil;
 
 + (AppleRemote*) sharedRemote {        
        @synchronized(self) {
-        if (sharedInstance == nil) {
+        if( sharedInstance == nil ) {
             sharedInstance = [[self alloc] init];
         }
     }
@@ -331,7 +329,7 @@ static void QueueCallbackFunction(void* target,  IOReturn result, void* refcon,
                memset(cookies, 0, sizeof(IOHIDElementCookie) * NUMBER_OF_APPLE_REMOTE_ACTIONS);
                */
                allCookies = [[NSMutableArray alloc] init];
-               int i;
+               unsigned int i;
                for (i=0; i< [elements count]; i++) {
                        element = [elements objectAtIndex:i];
                                                
@@ -372,7 +370,7 @@ static void QueueCallbackFunction(void* target,  IOReturn result, void* refcon,
                if (queue) {
                        result = (*queue)->create(queue, 0, 12);        //depth: maximum number of elements in queue before oldest elements in queue begin to be lost.
 
-                       int i=0;
+                       unsigned int i=0;
                        for(i=0; i<[allCookies count]; i++) {
                                IOHIDElementCookie cookie = (IOHIDElementCookie)[[allCookies objectAtIndex:i] intValue];
                                (*queue)->addElement(queue, cookie, 0);