From 2e7330affab701fb1443fec449e2b04690b32e33 Mon Sep 17 00:00:00 2001 From: ritsuka Date: Mon, 19 Jan 2015 15:35:35 +0000 Subject: MacGui: enable and fix more compiler warnings in the Xcode project. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6772 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/HBPreviewController.m | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'macosx/HBPreviewController.m') diff --git a/macosx/HBPreviewController.m b/macosx/HBPreviewController.m index e921574c1..b139fa25d 100644 --- a/macosx/HBPreviewController.m +++ b/macosx/HBPreviewController.m @@ -35,17 +35,17 @@ { QTTime time = [self currentTime]; double timeInSeconds = (double)time.timeValue / time.timeScale; - UInt16 seconds = fmod(timeInSeconds, 60.0); - UInt16 minutes = fmod(timeInSeconds / 60.0, 60.0); - UInt16 hours = timeInSeconds / (60.0 * 60.0); - UInt16 milliseconds = (timeInSeconds - (int) timeInSeconds) * 1000; + UInt16 seconds = (UInt16)fmod(timeInSeconds, 60.0); + UInt16 minutes = (UInt16)fmod(timeInSeconds / 60.0, 60.0); + UInt16 hours = (UInt16)(timeInSeconds / (60.0 * 60.0)); + UInt16 milliseconds = (UInt16)(timeInSeconds - (int) timeInSeconds) * 1000; return [NSString stringWithFormat:@"%02d:%02d:%02d.%03d", hours, minutes, seconds, milliseconds]; } - (void) setCurrentTimeDouble: (double) value { long timeScale = [[self attributeForKey:QTMovieTimeScaleAttribute] longValue]; - [self setCurrentTime:QTMakeTime(value * timeScale, timeScale)]; + [self setCurrentTime:QTMakeTime((long long)value * timeScale, timeScale)]; } @end @@ -370,8 +370,8 @@ typedef enum ViewMode : NSUInteger { NSRect frame = [[self window] frame]; // Calculate border around content region of the frame - int borderX = frame.size.width - currentSize.width; - int borderY = frame.size.height - currentSize.height; + int borderX = (int)(frame.size.width - currentSize.width); + int borderY = (int)(frame.size.height - currentSize.height); // Make sure the frame is smaller than the screen NSSize maxSize = [[[self window] screen] visibleFrame].size; -- cgit v1.2.3