]> granicus.if.org Git - transmission/commitdiff
move a variable outside of a loop
authorMitchell Livingston <livings124@transmissionbt.com>
Sun, 14 Oct 2012 17:33:23 +0000 (17:33 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Sun, 14 Oct 2012 17:33:23 +0000 (17:33 +0000)
macosx/InfoActivityViewController.m
macosx/InfoGeneralViewController.m
macosx/StatusBarView.m

index 876003494929a56875d3f9815d4dcf8d8f6a593d..2ec9f29b2f0c6d76fdaaf7d51de1f633363a1ebe 100644 (file)
@@ -89,8 +89,8 @@
     
     NSArray * fields = @[ fDateAddedField, fDateCompletedField, fDateActivityField, fStateField, fProgressField, fHaveField, fDownloadedTotalField, fUploadedTotalField, fFailedHashField, fRatioField, fDownloadTimeField, fSeedTimeField, fErrorScrollView ];
     
+    const CGFloat widthIncrease = newMaxWidth - oldMaxWidth;
     for (NSView * field in fields) {
-        const CGFloat widthIncrease = newMaxWidth - oldMaxWidth;
         NSRect frame = [field frame];
         frame.origin.x += widthIncrease;
         frame.size.width -= widthIncrease;
index b920e86690a6d4f54053ce04cc03152c12a4f94a..cc24ba6fb045412c42ab7761dd649366e841508b 100644 (file)
@@ -84,8 +84,8 @@
     
     NSArray * fields = @[ fPiecesField, fHashField, fSecureField, fCreatorField, fDateCreatedField, fCommentScrollView, fDataLocationField ];
     
+    const CGFloat widthIncrease = newMaxWidth - oldMaxWidth;
     for (NSView * field in fields) {
-        const CGFloat widthIncrease = newMaxWidth - oldMaxWidth;
         NSRect frame = [field frame];
         frame.origin.x += widthIncrease;
         frame.size.width -= widthIncrease;
index e3d4a91ee8b22ceb07246c7be634aa8eef7972c3..4342f70ffb226961ad744734608ba08eb2affc55 100644 (file)
@@ -42,7 +42,6 @@
         NSColor * darkColor = [NSColor colorWithCalibratedRed: 155.0/255.0 green: 155.0/255.0 blue: 155.0/255.0 alpha: 1.0];
         fGradient = [[NSGradient alloc] initWithStartingColor: lightColor endingColor: darkColor];
         
-        //noise only for 10.7 + 
         if([NSApp isOnLionOrBetter])
         {
             CIFilter * randomFilter = [CIFilter filterWithName: @"CIRandomGenerator"];