Changeset 978


Ignore:
Timestamp:
Oct 4, 2006, 7:34:04 PM (15 years ago)
Author:
livings124
Message:

remove unneeded variable assignment

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/PiecesView.m

    r970 r978  
    2828#define BETWEEN 1.0
    2929
    30 #define BLANK -99
    31 
    3230@implementation PiecesView
    3331
     
    3937        int numPieces = MAX_ACROSS * MAX_ACROSS;
    4038        fPieces = malloc(numPieces);
    41         int i;
    42         for (i = 0; i < numPieces; i++)
    43             fPieces[i] = BLANK;
    4439    }
    4540   
     
    162157        return;
    163158   
    164     NSImage * image = first ? [fBack copy] : [fImageView image];
     159    if (first)
     160    {
     161        NSImage * back = [fBack copy];
     162        [fImageView setImage: back];
     163        [back release];
     164    }
     165    NSImage * image = [fImageView image];
    165166   
    166167    int8_t * pieces = malloc(fNumPieces);
     
    245246    {
    246247        [image unlockFocus];
    247    
    248         if (first)
    249         {
    250             [fImageView setImage: image];
    251             [image release];
    252         }
    253         else
    254             [fImageView setNeedsDisplay];
     248        [fImageView setNeedsDisplay];
    255249    }
    256250   
Note: See TracChangeset for help on using the changeset viewer.