Changeset 3531

Show
Ignore:
Timestamp:
01/04/07 01:38:36 (2 years ago)
Author:
timothy
Message:

More tweaks to the utility inline functions.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Additions/MVUtilities.h

    r3530 r3531  
    22 
    33NS_INLINE void MVSafeAssign( id *var, id newValue ) { 
     4        if( *var == newValue ) 
     5                return; 
    46        id old = *var; 
    57        *var = newValue; 
     
    810 
    911NS_INLINE void MVSafeRetainAssign( id *var, id newValue ) { 
     12        if( *var == newValue ) 
     13                return; 
    1014        id old = *var; 
    1115        *var = [newValue retain]; 
     
    1418 
    1519NS_INLINE void MVSafeCopyAssign( id *var, id newValue ) { 
     20        if( *var == newValue ) 
     21                return; 
    1622        id old = *var; 
    1723        *var = [newValue copyWithZone:nil];