Permalink
Browse files

Less warnings on 64 bit.

  • Loading branch information...
1 parent 95f3423 commit c6056b560ef3605414aaa826ceb0cdb6168b4cb2 @uliwitness committed Apr 1, 2013
Showing with 14 additions and 11 deletions.
  1. +3 −3 NSFileManager+NameForTempFile.m
  2. +6 −6 NSWindow+ULIZoomEffect.m
  3. +3 −0 UKGraphics.m
  4. +1 −1 UKRandomInteger.h
  5. +1 −1 UKRandomInteger.m
View
6 NSFileManager+NameForTempFile.m
@@ -77,7 +77,7 @@ -(NSString*) uniqueFileName: (NSString*)oldName
NSString* baseName = [oldName stringByDeletingPathExtension];
NSString* suffix = [oldName pathExtension];
NSString* numSuffix = nil;
- int n = 1;
+ NSInteger n = 1;
NSString* fname = oldName;
BOOL didRemoveTrailingNumber = NO;
@@ -110,9 +110,9 @@ -(NSString*) uniqueFileName: (NSString*)oldName
}
if( [suffix length] == 0 ) // Build "/folder/file 1"-style path:
- fname = [baseName stringByAppendingString: [NSString stringWithFormat:@" %i", n++]];
+ fname = [baseName stringByAppendingString: [NSString stringWithFormat:@" %ld", n++]];
else // Build "/folder/file 1.suffix"-style path:
- fname = [baseName stringByAppendingString: [NSString stringWithFormat:@" %i.%@", n++, suffix]];
+ fname = [baseName stringByAppendingString: [NSString stringWithFormat:@" %ld.%@", n++, suffix]];
if( n <= 0 ) // overflow!
return nil;
View
12 NSWindow+ULIZoomEffect.m
@@ -199,11 +199,11 @@ -(NSImage*) uli_imageWithSnapshotForceActive: (BOOL)doForceActive
// Create a borderless window that shows and contains the given image:
--(NSWindow*) uli_animationWindowForZoomEffectWithImage: (NSImage*)snapshotImage
+-(ULIQuicklyAnimatingWindow*) uli_animationWindowForZoomEffectWithImage: (NSImage*)snapshotImage
{
NSRect myFrame = [self frame];
myFrame.size = [snapshotImage size];
- NSWindow * animationWindow = [[ULIQuicklyAnimatingWindow alloc] initWithContentRect: myFrame styleMask: NSBorderlessWindowMask backing: NSBackingStoreBuffered defer: NO];
+ ULIQuicklyAnimatingWindow * animationWindow = [[ULIQuicklyAnimatingWindow alloc] initWithContentRect: myFrame styleMask: NSBorderlessWindowMask backing: NSBackingStoreBuffered defer: NO];
[animationWindow setOpaque: NO];
if( [animationWindow respondsToSelector: @selector(setAnimationBehavior:)] )
@@ -241,7 +241,7 @@ -(void) makeKeyAndOrderFrontWithPopEffect
NSRect myFrame = [self frame];
NSRect poppedFrame = NSInsetRect(myFrame, -20, -20);
myFrame.size = snapshotImage.size;
- NSWindow * animationWindow = [self uli_animationWindowForZoomEffectWithImage: snapshotImage];
+ ULIQuicklyAnimatingWindow * animationWindow = [self uli_animationWindowForZoomEffectWithImage: snapshotImage];
[animationWindow setAnimationResizeTime: 0.025];
[animationWindow setFrame: myFrame display: YES];
[animationWindow orderFront: nil];
@@ -275,7 +275,7 @@ -(void) makeKeyAndOrderFrontWithZoomEffectFromRect: (NSRect)globalStartPoint
NSImage * snapshotImage = [self uli_imageWithSnapshotForceActive: YES];
NSRect myFrame = [self frame];
myFrame.size = snapshotImage.size;
- NSWindow * animationWindow = [self uli_animationWindowForZoomEffectWithImage: snapshotImage];
+ ULIQuicklyAnimatingWindow * animationWindow = [self uli_animationWindowForZoomEffectWithImage: snapshotImage];
[animationWindow setFrame: globalStartPoint display: YES];
[animationWindow orderFront: nil];
[animationWindow setFrame: myFrame display: YES animate: YES];
@@ -306,7 +306,7 @@ -(void) orderFrontWithZoomEffectFromRect: (NSRect)globalStartPoint
NSImage * snapshotImage = [self uli_imageWithSnapshotForceActive: NO];
NSRect myFrame = [self frame];
myFrame.size = snapshotImage.size;
- NSWindow * animationWindow = [self uli_animationWindowForZoomEffectWithImage: snapshotImage];
+ ULIQuicklyAnimatingWindow * animationWindow = [self uli_animationWindowForZoomEffectWithImage: snapshotImage];
[animationWindow setFrame: globalStartPoint display: YES];
[animationWindow orderFront: nil];
[animationWindow setFrame: myFrame display: YES animate: YES];
@@ -337,7 +337,7 @@ -(void) orderOutWithZoomEffectToRect: (NSRect)globalEndPoint
NSImage * snapshotImage = [self uli_imageWithSnapshotForceActive: NO];
NSRect myFrame = [self frame];
myFrame.size = snapshotImage.size;
- NSWindow * animationWindow = [self uli_animationWindowForZoomEffectWithImage: snapshotImage];
+ ULIQuicklyAnimatingWindow * animationWindow = [self uli_animationWindowForZoomEffectWithImage: snapshotImage];
[animationWindow setFrame: myFrame display: YES];
NSDisableScreenUpdates();
View
3 UKGraphics.m
@@ -35,6 +35,9 @@
#endif
+void UKGlossInterpolation(void *info, const CGFloat *input, CGFloat *output);
+
+
void UKDrawWhiteBezel( NSRect box, NSRect clipBox )
{
UKDrawDropHighlightedWhiteBezel( NO, box, clipBox );
View
2 UKRandomInteger.h
@@ -9,6 +9,6 @@
#import <Cocoa/Cocoa.h>
-NSInteger UKRandomInteger();
+NSInteger UKRandomInteger( void );
View
2 UKRandomInteger.m
@@ -9,7 +9,7 @@
#import "UKRandomInteger.h"
-NSInteger UKRandomInteger()
+NSInteger UKRandomInteger( void )
{
#if __LP64__
return (((NSInteger)rand()) | ((NSInteger)rand()) << 32);

0 comments on commit c6056b5

Please sign in to comment.