Changeset 1384

Show
Ignore:
Timestamp:
07/28/04 11:12:58 (4 years ago)
Author:
morris
Message:

use new typedefs

intValue -> unsignedIntValue instead of casting

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • WiredClient/trunk/WCChat.m

    r1382 r1384  
    1 /* $Id: WCChat.m,v 1.53 2004/07/27 19:07:00 morris Exp $ */ 
     1/* $Id: WCChat.m,v 1.54 2004/07/28 09:12:58 morris Exp $ */ 
    22 
    33/* 
     
    3030#import "NSDateAdditions.h" 
    3131#import "NSMutableAttributedStringAdditions.h" 
     32#import "NSStringAdditions.h" 
    3233#import "NSTextViewAdditions.h" 
    3334#import "NSWindowControllerAdditions.h" 
     
    259260        } 
    260261         
    261         if((unsigned int) [cid intValue] != _cid) 
     262        if([cid unsignedIntValue] != _cid) 
    262263                return; 
    263264 
     
    307308                return; 
    308309         
    309         if((unsigned int) [argument intValue] != _cid) 
     310        if([argument unsignedIntValue] != _cid) 
    310311                return; 
    311312 
     
    370371        } 
    371372         
    372         if((unsigned int) [cid intValue] != _cid) 
     373        if([cid unsignedIntValue] != _cid) 
    373374                return; 
    374375         
     
    451452        uid             = [fields objectAtIndex:1]; 
    452453         
    453         if((unsigned int) [cid intValue] != _cid) 
     454        if([cid unsignedIntValue] != _cid) 
    454455                return; 
    455456         
     
    701702        chat    = [fields objectAtIndex:2]; 
    702703 
    703         if((unsigned int) [cid intValue] != _cid) 
     704        if([cid unsignedIntValue] != _cid) 
    704705                return; 
    705706 
     
    811812        chat            = [fields objectAtIndex:2]; 
    812813 
    813         if((unsigned int) [cid intValue] != _cid) 
     814        if([cid unsignedIntValue] != _cid) 
    814815                return; 
    815816 
     
    901902        topic           = [fields objectAtIndex:1]; 
    902903         
    903         if((unsigned int) [cid intValue] != _cid) 
     904        if([cid unsignedIntValue] != _cid) 
    904905                return; 
    905906         
  • WiredClient/trunk/WCConnection.h

    r1383 r1384  
    1 /* $Id: WCConnection.h,v 1.16 2004/07/28 08:00:26 morris Exp $ */ 
     1/* $Id: WCConnection.h,v 1.17 2004/07/28 09:12:58 morris Exp $ */ 
    22 
    33/* 
     
    2626 * POSSIBILITY OF SUCH DAMAGE. 
    2727 */ 
     28 
     29enum WCConnectionType { 
     30        WCConnectionTypeServer                                  = 0, 
     31        WCConnectionTypeTracker 
     32}; 
     33typedef enum WCConnectionType                           WCConnectionType; 
     34 
    2835 
    2936@protocol WCConnectionErrorHandling 
     
    5764        id                                                                              _sender; 
    5865        NSTimer                                                                 *_timer; 
    59         unsigned int                                                  _type; 
     66        WCConnectionType                                              _type; 
    6067        unsigned int                                                    _uid; 
    6168        BOOL                                                                    _connected, _cancelled; 
    6269} 
    63  
    64  
    65 enum WCConnectionType { 
    66         WCConnectionTypeServer                                  = 0, 
    67         WCConnectionTypeTracker 
    68 }; 
    6970 
    7071 
     
    165166- (WCTransfers *)                                                       transfers; 
    166167 
    167 - (unsigned int)                                                      type; 
     168- (WCConnectionType)                                          type; 
    168169- (WCCache *)                                                           cache; 
    169170- (WCServer *)                                                          server; 
  • WiredClient/trunk/WCConnection.m

    r1376 r1384  
    1 /* $Id: WCConnection.m,v 1.21 2004/07/27 17:37:44 morris Exp $ */ 
     1/* $Id: WCConnection.m,v 1.22 2004/07/28 09:12:58 morris Exp $ */ 
    22 
    33/* 
     
    10671067#pragma mark - 
    10681068 
    1069 - (unsigned int)type { 
     1069- (WCConnectionType)type { 
    10701070        return _type; 
    10711071} 
  • WiredClient/trunk/WCPrivateChat.m

    r1376 r1384  
    1 /* $Id: WCPrivateChat.m,v 1.19 2004/07/27 17:37:44 morris Exp $ */ 
     1/* $Id: WCPrivateChat.m,v 1.20 2004/07/28 09:12:58 morris Exp $ */ 
    22 
    33/* 
     
    2727 */ 
    2828 
     29#import "NSStringAdditions.h" 
    2930#import "WCAccount.h" 
    3031#import "WCConnection.h" 
     
    147148        uid             = [fields objectAtIndex:1]; 
    148149         
    149         if((unsigned int) [cid intValue] != _cid) 
     150        if([cid unsignedIntValue] != _cid) 
    150151                return; 
    151152 
  • WiredClient/trunk/WCTransfers.h

    r1383 r1384  
    1 /* $Id: WCTransfers.h,v 1.9 2004/07/28 08:00:26 morris Exp $ */ 
     1/* $Id: WCTransfers.h,v 1.10 2004/07/28 09:12:58 morris Exp $ */ 
    22 
    33/* 
     
    2727 */ 
    2828 
     29#import "WCTransfer.h" 
    2930#import "WCWindowController.h" 
    3031 
     
    6869 
    6970- (WCTransfer *)                                                transferWithPath:(NSString *)path; 
    70 - (WCTransfer *)                                                transferWithState:(unsigned int)state; 
     71- (WCTransfer *)                                                transferWithState:(WCTransferState)state; 
    7172- (unsigned int)                                                transfersCount; 
    7273 
  • WiredClient/trunk/WCTransfers.m

    r1383 r1384  
    1 /* $Id: WCTransfers.m,v 1.32 2004/07/28 08:00:26 morris Exp $ */ 
     1/* $Id: WCTransfers.m,v 1.33 2004/07/28 09:12:58 morris Exp $ */ 
    22 
    33/* 
     
    314314        // --- update queue position 
    315315        [transfer setState:WCTransferStateQueued]; 
    316         [transfer setQueue:(unsigned int) [queue intValue]]; 
     316        [transfer setQueue:[queue unsignedIntValue]]; 
    317317         
    318318        // --- reload table 
     
    717717 
    718718 
    719 - (WCTransfer *)transferWithState:(unsigned int)state { 
     719- (WCTransfer *)transferWithState:(WCTransferState)state { 
    720720        NSEnumerator            *enumerator; 
    721721        WCTransfer                      *each, *transfer = NULL; 
  • WiredClient/trunk/WCUserInfo.m

    r1371 r1384  
    1 /* $Id: WCUserInfo.m,v 1.20 2004/07/23 11:29:12 morris Exp $ */ 
     1/* $Id: WCUserInfo.m,v 1.21 2004/07/28 09:12:58 morris Exp $ */ 
    22 
    33/* 
     
    151151        uploads         = [fields objectAtIndex:14]; 
    152152         
    153         if((unsigned int) [uid intValue] != [_user uid]) 
     153        if([uid unsignedIntValue] != [_user uid]) 
    154154                return; 
    155155